https://github.com/Priyanshu3820 updated https://github.com/llvm/llvm-project/pull/180956
>From 49c70bb9b02aa596f174a53d04b29b3f26c55c1d Mon Sep 17 00:00:00 2001 From: Priyanshu <[email protected]> Date: Wed, 11 Feb 2026 20:19:22 +0530 Subject: [PATCH 1/3] Fix failing my_fmaxf test --- clang/test/CIR/CodeGen/builtin-floating-point.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/clang/test/CIR/CodeGen/builtin-floating-point.c b/clang/test/CIR/CodeGen/builtin-floating-point.c index 4a331c73f0248..f2dfb80a82c7b 100644 --- a/clang/test/CIR/CodeGen/builtin-floating-point.c +++ b/clang/test/CIR/CodeGen/builtin-floating-point.c @@ -1731,16 +1731,15 @@ long double call_copysignl(long double x, long double y) { float my_fmaxf(float x, float y) { return __builtin_fmaxf(x, y); - // CHECK: cir.func no_inline dso_local @my_fmaxf - // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.float + // CIR-LABEL: my_fmaxf + // CIR: cir.call @fmaxf(%{{.*}}, %{{.*}}) nothrow side_effect(const) {{.*}} : (!cir.float, !cir.float) -> !cir.float - // LLVM: define dso_local float @my_fmaxf - // LLVM: %{{.+}} = call float @llvm.maxnum.f32(float %{{.+}}, float %{{.+}}) - // LLVM: } + // LLVM-LABEL: @my_fmaxf + // LLVM: call float @fmaxf(float %{{.*}}, float %{{.*}}) - // OGCG: define{{.*}}@my_fmaxf( - // OGCG: call float @llvm.maxnum.f32( -} + // OGCG-LABEL: @my_fmaxf + // OGCG: call float @llvm.maxnum.f32(float %{{.*}}, float %{{.*}}) + } double my_fmax(double x, double y) { return __builtin_fmax(x, y); >From 4e4c40a925d2d899229038d7baeb4b4bae671645 Mon Sep 17 00:00:00 2001 From: Priyanshu <[email protected]> Date: Wed, 11 Feb 2026 20:45:15 +0530 Subject: [PATCH 2/3] Update test --- clang/test/CIR/CodeGen/builtin-floating-point.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/test/CIR/CodeGen/builtin-floating-point.c b/clang/test/CIR/CodeGen/builtin-floating-point.c index f2dfb80a82c7b..ed5028c7ba660 100644 --- a/clang/test/CIR/CodeGen/builtin-floating-point.c +++ b/clang/test/CIR/CodeGen/builtin-floating-point.c @@ -1738,7 +1738,7 @@ float my_fmaxf(float x, float y) { // LLVM: call float @fmaxf(float %{{.*}}, float %{{.*}}) // OGCG-LABEL: @my_fmaxf - // OGCG: call float @llvm.maxnum.f32(float %{{.*}}, float %{{.*}}) + // OGCG: call nsz float @llvm.maxnum.f32(float %{{.*}}, float %{{.*}}) } double my_fmax(double x, double y) { >From 3e642dd9fcf5e3894dd75c9bd2c1a81b952290bd Mon Sep 17 00:00:00 2001 From: Priyanshu <[email protected]> Date: Wed, 11 Feb 2026 21:26:29 +0530 Subject: [PATCH 3/3] Update test --- clang/test/CIR/CodeGen/builtin-floating-point.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/test/CIR/CodeGen/builtin-floating-point.c b/clang/test/CIR/CodeGen/builtin-floating-point.c index ed5028c7ba660..7020f93f899ea 100644 --- a/clang/test/CIR/CodeGen/builtin-floating-point.c +++ b/clang/test/CIR/CodeGen/builtin-floating-point.c @@ -1732,10 +1732,10 @@ long double call_copysignl(long double x, long double y) { float my_fmaxf(float x, float y) { return __builtin_fmaxf(x, y); // CIR-LABEL: my_fmaxf - // CIR: cir.call @fmaxf(%{{.*}}, %{{.*}}) nothrow side_effect(const) {{.*}} : (!cir.float, !cir.float) -> !cir.float + // CIR: cir.fmaxnum %{{.*}}, %{{.*}} : !cir.float // LLVM-LABEL: @my_fmaxf - // LLVM: call float @fmaxf(float %{{.*}}, float %{{.*}}) + // LLVM: call float @llvm.maxnum.f32(float %{{.*}}, float %{{.*}}) // OGCG-LABEL: @my_fmaxf // OGCG: call nsz float @llvm.maxnum.f32(float %{{.*}}, float %{{.*}}) _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
