[llvm] [InstCombine] Handle trunc i1 pattern in eq-of-parts fold (PR #112704)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 18:22:35 PDT 2024


================
@@ -3538,6 +3546,9 @@ Value *InstCombinerImpl::foldBooleanAndOr(Value *LHS, Value *RHS,
       if (Value *Res = foldLogicOfFCmps(LHSCmp, RHSCmp, IsAnd, IsLogical))
         return Res;
 
+  if (Value *Res = foldEqOfParts(LHS, RHS, IsAnd))
----------------
goldsteinn wrote:

If it works sure, but don't think we should make it a practice to try to maintain an ordering for the many many many different InstCombine folds. It will quickly become unmanagable.

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


More information about the llvm-commits mailing list