[clang] [CIR] Upstream floating point literal expressions (PR #129304)

Amr Hesham via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 1 02:55:36 PST 2025


================
@@ -57,3 +57,15 @@ bool boolfunc() { return true; }
 // CHECK:   %0 = cir.const #true
 // CHECK:   cir.return %0 : !cir.bool
 // CHECK: }
+
+float floatfunc() { return 42.42f; }
+// CHECK: cir.func @floatfunc() -> !cir.float {
+// CHECK:   %0 = cir.const #cir.fp<4.242000e+01> : !cir.float
----------------
AmrDeveloper wrote:

As far as I understand both MLIR LLVM dialect and LLVM IR use the same format, I will update the test to just check this part `%0 = cir.const #cir.fp<4.242`

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


More information about the cfe-commits mailing list