[Mlir-commits] [mlir] TranslateToCpp: Emit floating point literals with suffix (PR #85392)

Simon Camphausen llvmlistbot at llvm.org
Fri Mar 15 06:36:13 PDT 2024


================
@@ -23,10 +23,10 @@ func.func @emitc_constant() {
 // CPP-DEFAULT-NEXT: uint8_t [[V4:[^ ]*]] = 255;
 // CPP-DEFAULT-NEXT: char [[V5:[^ ]*]] = CHAR_MIN;
 // CPP-DEFAULT-NEXT: size_t [[V6:[^ ]*]] = 2;
-// CPP-DEFAULT-NEXT: float [[V7:[^ ]*]] = (float)2.000000000e+00;
+// CPP-DEFAULT-NEXT: float [[V7:[^ ]*]] = 2.000000000e+00f;
----------------
simon-camp wrote:

Can you insert an f64 example. Seems we never had a test for doubles.

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


More information about the Mlir-commits mailing list