[CodeGenPrepare] Try and appease sanitizers

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

llvm-svn: 257886
This commit is contained in:
James Molloy 2016-01-15 10:36:01 +00:00
parent 48b93e1f21
commit 3ef84c4cbb
1 changed files with 1 additions and 1 deletions

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;
}