[CodeGenPrepare] Try and appease sanitizers

dupRetToEnableTailCallOpts(BB) can invalidate BB. It must run *after* we iterate across BB!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257886 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
James Molloy 2016-01-15 10:36:01 +00:00
parent b11cc50c0b
commit d6a317790e

View File

@ -5242,7 +5242,6 @@ bool CodeGenPrepare::optimizeBlock(BasicBlock &BB, bool& ModifiedDT) {
if (ModifiedDT)
return true;
}
MadeChange |= dupRetToEnableTailCallOpts(&BB);
bool MadeBitReverse = true;
while (TLI && MadeBitReverse) {
@ -5254,6 +5253,7 @@ bool CodeGenPrepare::optimizeBlock(BasicBlock &BB, bool& ModifiedDT) {
}
}
}
MadeChange |= dupRetToEnableTailCallOpts(&BB);
return MadeChange;
}