File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
llvm/lib/Transforms/Scalar Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1431,7 +1431,7 @@ bool IndVarSimplify::canonicalizeExitCondition(Loop *L) {
1431
1431
assert (BI->isConditional () && " exit branch must be conditional" );
1432
1432
1433
1433
auto *ICmp = dyn_cast<ICmpInst>(BI->getCondition ());
1434
- if (!ICmp || !ICmp->hasOneUse ())
1434
+ if (!ICmp || !ICmp->hasOneUse () || ICmp-> isUnsigned () )
1435
1435
continue ;
1436
1436
1437
1437
auto *LHS = ICmp->getOperand (0 );
@@ -1444,7 +1444,7 @@ bool IndVarSimplify::canonicalizeExitCondition(Loop *L) {
1444
1444
1445
1445
// Match (icmp signed-cond zext, RHS)
1446
1446
Value *LHSOp = nullptr ;
1447
- if (!match (LHS, m_ZExt (m_Value (LHSOp))) || !ICmp-> isSigned () )
1447
+ if (!match (LHS, m_ZExt (m_Value (LHSOp))))
1448
1448
continue ;
1449
1449
1450
1450
const DataLayout &DL = ExitingBB->getModule ()->getDataLayout ();
You can’t perform that action at this time.
0 commit comments