Skip to content

Commit 6f48b46

Browse files
committed
revert some setZero
1 parent 7f965e2 commit 6f48b46

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Support/KnownBits.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,8 @@ KnownBits KnownBits::ashr(const KnownBits &LHS, const KnownBits &RHS,
433433
MinShiftAmount = 1;
434434
if (LHS.isUnknown()) {
435435
if (MinShiftAmount == BitWidth) {
436-
// Always poison.
436+
// Always poison. Return zero because we don't like returning conflict.
437+
Known.setAllZero();
437438
return Known;
438439
}
439440
return Known;
@@ -447,7 +448,8 @@ KnownBits KnownBits::ashr(const KnownBits &LHS, const KnownBits &RHS,
447448
if (Exact) {
448449
unsigned FirstOne = LHS.countMaxTrailingZeros();
449450
if (FirstOne < MinShiftAmount) {
450-
// Always poison.
451+
// Always poison. Return zero because we don't like returning conflict.
452+
Known.setAllZero();
451453
return Known;
452454
}
453455
MaxShiftAmount = std::min(MaxShiftAmount, FirstOne);

0 commit comments

Comments
 (0)