[Mlir-commits] [mlir] 247df97 - [MLIR][Arith] Enable strict property assembly format (NFC) (#217267)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Aug 19 03:54:51 PDT 2026


Author: Mehdi Amini
Date: 2026-08-19T10:54:47Z
New Revision: 247df97829dcd51aa5e18f78137efa15f99dd46b

URL: https://github.com/llvm/llvm-project/commit/247df97829dcd51aa5e18f78137efa15f99dd46b
DIFF: https://github.com/llvm/llvm-project/commit/247df97829dcd51aa5e18f78137efa15f99dd46b.diff

LOG: [MLIR][Arith] Enable strict property assembly format (NFC) (#217267)

Enable the strict properties assembly format mode for the Arith dialect.
Update tests that still used attr-dict spelling for fastmath attributes
to use the existing declarative fastmath assembly form.

Assisted-by: Codex

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Arith/IR/ArithBase.td
    mlir/test/Conversion/ArithToLLVM/arith-to-llvm.mlir
    mlir/test/Examples/transform/ChH/full.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Arith/IR/ArithBase.td b/mlir/include/mlir/Dialect/Arith/IR/ArithBase.td
index 985ae01008002..760c502ccf1f5 100644
--- a/mlir/include/mlir/Dialect/Arith/IR/ArithBase.td
+++ b/mlir/include/mlir/Dialect/Arith/IR/ArithBase.td
@@ -14,6 +14,7 @@ include "mlir/IR/OpBase.td"
 
 def Arith_Dialect : Dialect {
   let name = "arith";
+  let useStrictPropertiesInAssemblyFormat = 1;
   let cppNamespace = "::mlir::arith";
   let description = [{
     The arith dialect is intended to hold basic integer and floating point

diff  --git a/mlir/test/Conversion/ArithToLLVM/arith-to-llvm.mlir b/mlir/test/Conversion/ArithToLLVM/arith-to-llvm.mlir
index 34a80eff42fed..8a8b48f5d6143 100644
--- a/mlir/test/Conversion/ArithToLLVM/arith-to-llvm.mlir
+++ b/mlir/test/Conversion/ArithToLLVM/arith-to-llvm.mlir
@@ -557,7 +557,7 @@ func.func @fcmp(f32, f32) -> () {
   %13 = arith.cmpf une, %arg0, %arg1 : f32
   %14 = arith.cmpf uno, %arg0, %arg1 : f32
 
-  %15 = arith.cmpf oeq, %arg0, %arg1 {fastmath = #arith.fastmath<fast>} : f32
+  %15 = arith.cmpf oeq, %arg0, %arg1 fastmath<fast> : f32
 
   return
 }
@@ -981,4 +981,3 @@ func.func @supported_fp_type(%arg0: f32, %arg1: vector<4xf32>, %arg2: vector<4x8
   %3 = arith.cmpf oeq, %arg0, %arg3 : f32
   return
 }
-

diff  --git a/mlir/test/Examples/transform/ChH/full.mlir b/mlir/test/Examples/transform/ChH/full.mlir
index 1293406d72475..c54d565c26ce7 100644
--- a/mlir/test/Examples/transform/ChH/full.mlir
+++ b/mlir/test/Examples/transform/ChH/full.mlir
@@ -61,8 +61,8 @@ func.func @conv(
     // Note the fastmath attributes that allow operations to be recombined into
     //   %0 = math.fma %in, %f, %b : f32
     // later on and to reorder reductions.
-    %m1 = arith.mulf %in, %f  {fastmath = #arith.fastmath<fast>} : f32
-    %0 = arith.addf %b, %m1  {fastmath = #arith.fastmath<fast>} : f32
+    %m1 = arith.mulf %in, %f fastmath<fast> : f32
+    %0 = arith.addf %b, %m1 fastmath<fast> : f32
     linalg.yield %0 : f32
   } -> !toutput
 


        


More information about the Mlir-commits mailing list