mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 14:10:41 +00:00
Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108793 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bf1ae5e254
commit
fb272ad614
@ -50,13 +50,10 @@ static bool IVUseShouldUsePostIncValue(Instruction *User, Instruction *IV,
|
||||
// Look at all of the uses of IV by the PHI node. If any use corresponds to
|
||||
// a block that is not dominated by the latch block, give up and use the
|
||||
// preincremented value.
|
||||
unsigned NumUses = 0;
|
||||
for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
|
||||
if (PN->getIncomingValue(i) == IV) {
|
||||
++NumUses;
|
||||
if (!DT->dominates(LatchBlock, PN->getIncomingBlock(i)))
|
||||
return false;
|
||||
}
|
||||
if (PN->getIncomingValue(i) == IV &&
|
||||
!DT->dominates(LatchBlock, PN->getIncomingBlock(i)))
|
||||
return false;
|
||||
|
||||
// Okay, all uses of IV by PN are in predecessor blocks that really are
|
||||
// dominated by the latch block. Use the post-incremented value.
|
||||
|
Loading…
Reference in New Issue
Block a user