[Mlir-commits] [mlir] [MLIR][Arith] Add denormal attribute to binary/unary operations (PR #112700)
lorenzo chelini
llvmlistbot at llvm.org
Fri Nov 22 12:04:59 PST 2024
================
@@ -1161,3 +1161,73 @@ func.func @intflags_func(%arg0: i64, %arg1: i64) {
%3 = arith.shli %arg0, %arg1 overflow<nsw, nuw> : i64
return
}
+
+// CHECK-LABEL: check_denorm_modes
+func.func @check_denorm_modes(%arg0: f32, %arg1: f32, %arg2: f32) {
+ %c_denorm = arith.constant 1.4e-45 : f32
+ // CHECK: %{{.+}} = arith.subf %{{.+}}, %{{.+}} denormal<preserve_sign> : f32
+ %sub_preserve_sign = arith.subf %arg0, %c_denorm denormal<preserve_sign> : f32
+ // CHECK: %{{.+}} = arith.subf %{{.+}}, %{{.+}} denormal<positive_zero> : f32
+ %sub_positive_zero = arith.subf %arg1, %c_denorm denormal<positive_zero> : f32
+ // CHECK: %{{.+}} = arith.subf %{{.+}}, %{{.+}} : f32
----------------
chelini wrote:
I explicitly capture SSA values now.
https://github.com/llvm/llvm-project/pull/112700
More information about the Mlir-commits
mailing list