[llvm] [InstCombine] fold `(a == c && b != c) || (a != c && b == c))` to `(a == c) == (b != c)` (PR #94915)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 20:34:31 PDT 2024
================
@@ -3421,6 +3421,23 @@ Value *InstCombinerImpl::foldAndOrOfICmps(ICmpInst *LHS, ICmpInst *RHS,
return foldAndOrOfICmpsUsingRanges(LHS, RHS, IsAnd);
}
+Value *foldAorBZero(BinaryOperator &I, InstCombiner::BuilderTy &Builder) {
+ Value *Op0 = I.getOperand(0);
----------------
goldsteinn wrote:
Since this is only for `or` at the moment, think an assert of `I.getOpcode` would be useful to avoid future misreads.
https://github.com/llvm/llvm-project/pull/94915
More information about the llvm-commits
mailing list