[Mlir-commits] [mlir] [mlir][arith] Add mulf(x, 0) -> 0 to mulf folder (PR #161395)

Jakub Kuderski llvmlistbot at llvm.org
Wed Oct 1 06:38:59 PDT 2025


================
@@ -2216,6 +2216,18 @@ func.func @test_mulf1(%arg0 : f32, %arg1 : f32) -> (f32) {
   return %2 : f32
 }
 
+// CHECK-LABEL: @test_mulf2(
+func.func @test_mulf2(%arg0 : f32) -> (f32, f32) {
+  // CHECK-NEXT:  %[[C0:.+]] = arith.constant 0.000000e+00 : f32
+  // CHECK-NEXT:  %[[C0n:.+]] = arith.constant -0.000000e+00 : f32
----------------
kuhar wrote:

You can use `CHECK-DAG:` so that you don't rely on the exact order of constants

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


More information about the Mlir-commits mailing list