Skip to content

Commit d467f0d

Browse files
committed
Use isKnownNonNegative, add available information to the SimplifyQuery
1 parent 7af5dfd commit d467f0d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,10 @@ bool SeparateConstOffsetFromGEP::splitGEP(GetElementPtrInst *GEP) {
10821082
RecursivelyDeleteTriviallyDeadInstructions(UserChainTail);
10831083
RecursivelyDeleteTriviallyDeadInstructions(OldIdx);
10841084
MayRecoverInbounds =
1085-
MayRecoverInbounds && computeKnownBits(NewIdx, *DL).isNonNegative();
1085+
MayRecoverInbounds &&
1086+
isKnownNonNegative(
1087+
NewIdx,
1088+
SimplifyQuery(*DL, TLI, DT, /*AC=*/nullptr, /*CXTI=*/GEP));
10861089
}
10871090
}
10881091
}

0 commit comments

Comments
 (0)