[llvm] [InstCombine] Drop samesign in `foldLogOpOfMaskedICmps` (PR #125829)

Andreas Jonson via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 23:06:05 PST 2025


================
@@ -610,8 +610,11 @@ static Value *foldLogOpOfMaskedICmps(Value *LHS, Value *RHS, bool IsAnd,
       APInt NewMask = *ConstB & *ConstD;
       if (NewMask == *ConstB)
         return LHS;
-      if (NewMask == *ConstD)
+      if (NewMask == *ConstD) {
+        if (IsLogical)
+          cast<ICmpInst>(RHS)->setSameSign(false);
----------------
andjo403 wrote:

yes so that I do not need to update it when I make that commit 

https://github.com/llvm/llvm-project/pull/125829


More information about the llvm-commits mailing list