mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 02:16:46 +00:00
Fix IVUsers to avoid assuming that the loop has a unique backedge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86161 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6890584ab1
commit
a6a4aaefee
@ -151,6 +151,8 @@ static bool IVUseShouldUsePostIncValue(Instruction *User, Instruction *IV,
|
||||
if (L->contains(User->getParent())) return false;
|
||||
|
||||
BasicBlock *LatchBlock = L->getLoopLatch();
|
||||
if (!LatchBlock)
|
||||
return false;
|
||||
|
||||
// Ok, the user is outside of the loop. If it is dominated by the latch
|
||||
// block, use the post-inc value.
|
||||
|
Loading…
Reference in New Issue
Block a user