forked from OSchip/llvm-project
IfConversion: Don't count branches in # of duplicates.
If the entire blocks match, we would count the branch instructions toward the number of duplicated instructions. This doesn't match what we do elsewhere, and was causing a bug. llvm-svn: 280448
This commit is contained in:
parent
c906ff63da
commit
93e94e8a12
|
@ -671,7 +671,9 @@ bool IfConverter::CountDuplicatedInstructions(
|
|||
std::vector<MachineOperand> PredDefs;
|
||||
if (TII->DefinesPredicate(*TIB, PredDefs))
|
||||
return false;
|
||||
++Dups1;
|
||||
// If we get all the way to the branch instructions, don't count them.
|
||||
if (!TIB->isBranch())
|
||||
++Dups1;
|
||||
++TIB;
|
||||
++FIB;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue