https://github.com/bcardosolopes approved this pull request.
LGTM after any extra feedback on format
https://github.com/llvm/llvm-project/pull/129304
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/129304
>From d13f2d0d40987302243efad7304a1a006fdb2dde Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 28 Feb 2025 21:42:36 +0100
Subject: [PATCH 1/2] [CIR] Upstream floating point literal expressions
---
@@ -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> : !c
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/129304
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -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> : !c
@@ -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> : !c
@@ -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> : !c
llvmbot wrote:
@llvm/pr-subscribers-clangir
@llvm/pr-subscribers-clang
Author: Amr Hesham (AmrDeveloper)
Changes
This change adds support for floating point literal expressions
---
Full diff: https://github.com/llvm/llvm-project/pull/129304.diff
2 Files Affected:
- (modified) clang/lib
https://github.com/AmrDeveloper created
https://github.com/llvm/llvm-project/pull/129304
This change adds support for floating point literal expressions
>From d13f2d0d40987302243efad7304a1a006fdb2dde Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 28 Feb 2025 21:42:36 +0100
Subject: [PA