[llvm] [InstCombine] Fold abs(a * abs(b)) --> abs(a * b) (PR #78110)

via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 14:06:10 PST 2024


================
@@ -218,6 +218,16 @@ Instruction *InstCombinerImpl::visitMul(BinaryOperator &I) {
                   : BinaryOperator::CreateNeg(Op0);
   }
 
+  {
+    // abs(a * abs(b)) --> abs(a * b)
----------------
elhewaty wrote:

@dtcxzyw, @nikic updated.

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


More information about the llvm-commits mailing list