[Mlir-commits] [mlir] [MLIR][Arith] Add denormal attribute to binary/unary operations (PR #112700)
lorenzo chelini
llvmlistbot at llvm.org
Fri Nov 22 10:24:45 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:
Actually, if we switch to plain enum ieee, is printed. Do you want to avoid printing the default case (ieee)?
https://github.com/llvm/llvm-project/pull/112700
More information about the Mlir-commits
mailing list