[llvm] [InstCombine] Drop `samesign` in InstCombine (PR #112480)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 16 01:18:12 PDT 2024
================
@@ -1738,6 +1738,7 @@ Instruction *InstCombinerImpl::foldICmpAndShift(ICmpInst &Cmp,
// Compute X & (C2 << Y).
Value *NewAnd = Builder.CreateAnd(Shift->getOperand(0), NewShift);
+ Cmp.setSameSign(false);
return replaceOperand(Cmp, 0, NewAnd);
----------------
nikic wrote:
Can we create a new icmp here instead? I don't see a good reason to do in-place modification here, and it causes this kind of issue...
https://github.com/llvm/llvm-project/pull/112480
More information about the llvm-commits
mailing list