[Mlir-commits] [mlir] [MLIR][Transforms] add eliminate-explicit-rounding pass (PR #93443)

Mehdi Amini llvmlistbot at llvm.org
Wed May 29 19:00:08 PDT 2024


================
@@ -117,4 +117,50 @@ def ArithIntNarrowing : Pass<"arith-int-narrowing"> {
   ];
  }
 
+ def EliminateExplicitRounding : Pass<"eliminate-explicit-rounding"> {
+  let summary = "Eliminate the intermidiate truncf/extf pairs";
+  let description = [{
+    `legalize-to-f32` and `arith-emulate-unsupported-floats` pass does f32 promotion
+    for every op belonging to the illegal op list. Once there are some consecutive
+    illegal ops, these passes will insert `arith.truncf` and `arith.extf` pairs
+    between the illegal ops.
+    
+    This pass is to eliminate the intermidiate truncf/extf pairs to improve
----------------
joker-eph wrote:

```suggestion
    This pass is to eliminate the intermediate truncf/extf pairs to improve
```

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


More information about the Mlir-commits mailing list