[llvm] [InstCombine] Fix assertion failure in issue80597 (PR #80614)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 4 22:07:28 PST 2024
================
@@ -801,6 +802,10 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
LShr->takeName(I);
return InsertNewInstWith(LShr, I->getIterator());
} else if (Known.One[BitWidth-ShiftAmt-1]) { // New bits are known one.
+ // Sync SignBits with computeKnownBits to make sure there is no
+ // conflict.
+ HighBits = APInt::getHighBitsSet(
+ BitWidth, std::min(MinSignBits + ShiftAmt - 1, BitWidth));
Known.One |= HighBits;
----------------
dtcxzyw wrote:
Done.
https://github.com/llvm/llvm-project/pull/80614
More information about the llvm-commits
mailing list