Skip to content

Commit b7fc260

Browse files
committed
IS: fix thinko
1 parent 1607671 commit b7fc260

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Analysis/InstructionSimplify.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,10 +2686,9 @@ static Constant *computePointerICmp(CmpPredicate Pred, Value *LHS, Value *RHS,
26862686
const DataLayout &DL = Q.DL;
26872687
const TargetLibraryInfo *TLI = Q.TLI;
26882688

2689-
// We fold equality and unsigned integer predicates on pointer comparisons,
2690-
// but forbid signed predicates since a GEP with inbounds could cross the sign
2691-
// boundary.
2692-
if (!CmpInst::isIntPredicate(Pred) || CmpInst::isSigned(Pred))
2689+
// We fold equality and unsigned predicates on pointer comparisons, but forbid
2690+
// signed predicates since a GEP with inbounds could cross the sign boundary.
2691+
if (CmpInst::isSigned(Pred))
26932692
return nullptr;
26942693

26952694
// We have to switch to a signed predicate to handle negative indices from

0 commit comments

Comments
 (0)