[llvm] [TargetLowering] Fold (a | b) ==/!= b -> (a & ~b) == /!= 0 when and-not exists (PR #145368)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 24 06:58:41 PDT 2025
================
@@ -4212,6 +4212,53 @@ SDValue TargetLowering::foldSetCCWithAnd(EVT VT, SDValue N0, SDValue N1,
return SDValue();
}
+/// This helper function of SimplifySetCC tries to optimize the comparison when
+/// either operand of the SetCC node is a bitwise-or instruction.
----------------
RKSimon wrote:
It'd be better if the matched pattern comments were moved up here to the summary.
https://github.com/llvm/llvm-project/pull/145368
More information about the llvm-commits
mailing list