[llvm] [InstCombine] Combine or-disjoint (and->mul), (and->mul) to and->mul (PR #136013)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 5 06:32:00 PDT 2025


================
@@ -3593,6 +3593,78 @@ static Value *foldOrOfInversions(BinaryOperator &I,
   return nullptr;
 }
 
+// A decomposition of ((A & N) ? 0 : N * C) . Where X = A, Factor = C, Mask = N.
----------------
nikic wrote:

I think it would be clearer if you wrote this directly with the correct names instead of specifying the mapping separately: `(X & Mask) ? 0 : Mask * Factor`

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


More information about the llvm-commits mailing list