[llvm] [InstCombine] Improve folding of `icmp pred (and X, Mask/~Mask), Y)` (PR #81562)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 00:48:57 PST 2024
================
@@ -4163,7 +4293,9 @@ static Value *foldICmpWithLowBitMaskedVal(ICmpInst &I,
M = Constant::replaceUndefsWith(VecC, SafeReplacementConstant);
}
- return Builder.CreateICmp(DstPred, X, M);
+ if (NeedsNot)
+ M = IC.Builder.CreateNot(M);
----------------
dtcxzyw wrote:
Use `IC.getFreelyInverted`?
https://github.com/llvm/llvm-project/pull/81562
More information about the llvm-commits
mailing list