[CGP] Remove ModifiedDT from the makeBitReverse loop

I don't think anything in this loop modifies the control flow and we don't restart any iteration after setting the flag.

This code was added in http://reviews.llvm.org/D16893 but looking at the test case added there the code that caused the dominator tree to change was merging blocks with their predecessor not the bitreverse optimization.

Differential Revision: https://reviews.llvm.org/D66366

llvm-svn: 369283
This commit is contained in:
Craig Topper 2019-08-19 18:02:24 +00:00
parent ab00f237ac
commit 93c2787193
1 changed files with 0 additions and 1 deletions

View File

@ -7104,7 +7104,6 @@ bool CodeGenPrepare::optimizeBlock(BasicBlock &BB, bool &ModifiedDT) {
for (auto &I : reverse(BB)) {
if (makeBitReverse(I, *DL, *TLI)) {
MadeBitReverse = MadeChange = true;
ModifiedDT = true;
break;
}
}