Skip to content

Commit b705cbc

Browse files
committed
add nopoison back
1 parent 99f66fa commit b705cbc

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

llvm/lib/Transforms/Scalar/ConstraintElimination.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,17 +1132,14 @@ void State::addInfoFor(BasicBlock &BB) {
11321132
case Intrinsic::umax:
11331133
case Intrinsic::smin:
11341134
case Intrinsic::smax:
1135+
case Intrinsic::usub_sat:
11351136
// TODO: handle llvm.abs as well
11361137
WorkList.push_back(
11371138
FactOrCheck::getCheck(DT.getNode(&BB), cast<CallInst>(&I)));
11381139
// TODO: Check if it is possible to instead only added the min/max facts
11391140
// when simplifying uses of the min/max intrinsics.
1140-
if (isGuaranteedNotToBePoison(&I))
1141-
WorkList.push_back(FactOrCheck::getInstFact(DT.getNode(&BB), &I));
1142-
break;
1143-
case Intrinsic::usub_sat:
1144-
WorkList.push_back(
1145-
FactOrCheck::getCheck(DT.getNode(&BB), cast<CallInst>(&I)));
1141+
if (!isGuaranteedNotToBePoison(&I))
1142+
break;
11461143
[[fallthrough]];
11471144
case Intrinsic::abs:
11481145
case Intrinsic::uadd_sat:

0 commit comments

Comments
 (0)