[clang] [CIR][NFC] Move some builtin tests to the CodeGenBuitins folder (PR #183607)
Ayokunle Amodu via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 26 14:51:50 PST 2026
https://github.com/ayokunle321 updated https://github.com/llvm/llvm-project/pull/183607
>From 232f832fe561e5d31bebb45a6d48f4c6a276b72e Mon Sep 17 00:00:00 2001
From: Ayokunle Amodu <ayokunle321 at gmail.com>
Date: Thu, 26 Feb 2026 12:31:33 -0700
Subject: [PATCH 1/7] move buitin tests to correct folder
---
clang/test/CIR/CodeGen/builtins-elementwise.c | 515 ------------------
.../builtin-address-of.cpp} | 0
.../builtin-bit-cast.cpp | 0
.../builtin-floating-point.c | 0
.../builtin-memchr.c | 0
.../CodeGenBuiltins/builtins-elementwise.c | 503 +++++++++++++++--
6 files changed, 460 insertions(+), 558 deletions(-)
delete mode 100644 clang/test/CIR/CodeGen/builtins-elementwise.c
rename clang/test/CIR/{CodeGen/address-of.cpp => CodeGenBuiltins/builtin-address-of.cpp} (100%)
rename clang/test/CIR/{CodeGen => CodeGenBuiltins}/builtin-bit-cast.cpp (100%)
rename clang/test/CIR/{CodeGen => CodeGenBuiltins}/builtin-floating-point.c (100%)
rename clang/test/CIR/{CodeGen => CodeGenBuiltins}/builtin-memchr.c (100%)
diff --git a/clang/test/CIR/CodeGen/builtins-elementwise.c b/clang/test/CIR/CodeGen/builtins-elementwise.c
deleted file mode 100644
index 6c31ce19788d9..0000000000000
--- a/clang/test/CIR/CodeGen/builtins-elementwise.c
+++ /dev/null
@@ -1,515 +0,0 @@
-// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -emit-cir %s -o %t.cir
-// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -fclangir \
-// RUN: -emit-llvm %s -o %t.ll
-// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -emit-llvm %s -o %t-ogcg.ll
-// RUN: FileCheck --check-prefix=OGCG --input-file=%t-ogcg.ll %s
-
-typedef int vint4 __attribute__((ext_vector_type(4)));
-typedef float vfloat4 __attribute__((ext_vector_type(4)));
-typedef double vdouble4 __attribute__((ext_vector_type(4)));
-
-void test_builtin_elementwise_abs(vint4 vi4, int i, float f, double d,
- vfloat4 vf4, vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_abs
- // LLVM-LABEL: test_builtin_elementwise_abs
- // OGCG-LABEL: test_builtin_elementwise_abs
- // CIR: {{%.*}} = cir.fabs {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.fabs.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.fabs.f32(float {{%.*}})
- f = __builtin_elementwise_abs(f);
-
- // CIR: {{%.*}} = cir.fabs {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.fabs.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.fabs.f64(double {{%.*}})
- d = __builtin_elementwise_abs(d);
-
- // CIR: {{%.*}} = cir.abs {{%.*}} : !cir.vector<4 x !s32i>
- // LLVM: {{%.*}} = call <4 x i32> @llvm.abs.v4i32(<4 x i32> {{%.*}}, i1 false)
- // OGCG: {{%.*}} = call <4 x i32> @llvm.abs.v4i32(<4 x i32> {{%.*}}, i1 false)
- vi4 = __builtin_elementwise_abs(vi4);
-
- // CIR: {{%.*}} = cir.abs {{%.*}} : !s32
- // LLVM: {{%.*}} = call i32 @llvm.abs.i32(i32 {{%.*}}, i1 false)
- // OGCG: {{%.*}} = call i32 @llvm.abs.i32(i32 {{%.*}}, i1 false)
- i = __builtin_elementwise_abs(i);
-
- // CIR: {{%.*}} = cir.fabs {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.fabs.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.fabs.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_abs(vf4);
-
- // CIR: {{%.*}} = cir.fabs {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.fabs.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.fabs.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_abs(vd4);
-}
-
-void test_builtin_elementwise_acos(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_acos
- // LLVM-LABEL: test_builtin_elementwise_acos
- // OGCG-LABEL: test_builtin_elementwise_acos
- // CIR: {{%.*}} = cir.acos {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.acos.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.acos.f32(float {{%.*}})
- f = __builtin_elementwise_acos(f);
-
- // CIR: {{%.*}} = cir.acos {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.acos.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.acos.f64(double {{%.*}})
- d = __builtin_elementwise_acos(d);
-
- // CIR: {{%.*}} = cir.acos {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.acos.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.acos.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_acos(vf4);
-
- // CIR: {{%.*}} = cir.acos {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.acos.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.acos.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_acos(vd4);
-}
-
-void test_builtin_elementwise_asin(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_asin
- // LLVM-LABEL: test_builtin_elementwise_asin
- // OGCG-LABEL: test_builtin_elementwise_asin
- // CIR: {{%.*}} = cir.asin {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.asin.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.asin.f32(float {{%.*}})
- f = __builtin_elementwise_asin(f);
-
- // CIR: {{%.*}} = cir.asin {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.asin.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.asin.f64(double {{%.*}})
- d = __builtin_elementwise_asin(d);
-
- // CIR: {{%.*}} = cir.asin {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.asin.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.asin.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_asin(vf4);
-
- // CIR: {{%.*}} = cir.asin {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.asin.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.asin.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_asin(vd4);
-}
-
-void test_builtin_elementwise_atan(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_atan
- // LLVM-LABEL: test_builtin_elementwise_atan
- // OGCG-LABEL: test_builtin_elementwise_atan
- // CIR: {{%.*}} = cir.atan {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.atan.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.atan.f32(float {{%.*}})
- f = __builtin_elementwise_atan(f);
-
- // CIR: {{%.*}} = cir.atan {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.atan.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.atan.f64(double {{%.*}})
- d = __builtin_elementwise_atan(d);
-
- // CIR: {{%.*}} = cir.atan {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.atan.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.atan.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_atan(vf4);
-
- // CIR: {{%.*}} = cir.atan {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.atan.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.atan.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_atan(vd4);
-}
-
-void test_builtin_elementwise_atan2(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_atan2
- // LLVM-LABEL: test_builtin_elementwise_atan2
- // OGCG-LABEL: test_builtin_elementwise_atan2
- // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.atan2.f32(float {{%.*}}, float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.atan2.f32(float {{%.*}}, float {{%.*}})
- f = __builtin_elementwise_atan2(f, f);
-
- // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.atan2.f64(double {{%.*}}, double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.atan2.f64(double {{%.*}}, double {{%.*}})
- d = __builtin_elementwise_atan2(d, d);
-
- // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.atan2.v4f32(<4 x float> {{%.*}}, <4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.atan2.v4f32(<4 x float> {{%.*}}, <4 x float> {{%.*}})
- vf4 = __builtin_elementwise_atan2(vf4, vf4);
-
- // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.atan2.v4f64(<4 x double> {{%.*}}, <4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.atan2.v4f64(<4 x double> {{%.*}}, <4 x double> {{%.*}})
- vd4 = __builtin_elementwise_atan2(vd4, vd4);
-}
-
-void test_builtin_elementwise_exp(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_exp
- // LLVM-LABEL: test_builtin_elementwise_exp
- // OGCG-LABEL: test_builtin_elementwise_exp
- // CIR: {{%.*}} = cir.exp {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.exp.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.exp.f32(float {{%.*}})
- f = __builtin_elementwise_exp(f);
-
- // CIR: {{%.*}} = cir.exp {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.exp.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.exp.f64(double {{%.*}})
- d = __builtin_elementwise_exp(d);
-
- // CIR: {{%.*}} = cir.exp {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.exp.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.exp.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_exp(vf4);
-
- // CIR: {{%.*}} = cir.exp {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.exp.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.exp.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_exp(vd4);
-}
-
-void test_builtin_elementwise_exp2(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_exp2
- // LLVM-LABEL: test_builtin_elementwise_exp2
- // OGCG-LABEL: test_builtin_elementwise_exp2
- // CIR: {{%.*}} = cir.exp2 {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.exp2.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.exp2.f32(float {{%.*}})
- f = __builtin_elementwise_exp2(f);
-
- // CIR: {{%.*}} = cir.exp2 {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.exp2.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.exp2.f64(double {{%.*}})
- d = __builtin_elementwise_exp2(d);
-
- // CIR: {{%.*}} = cir.exp2 {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.exp2.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.exp2.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_exp2(vf4);
-
- // CIR: {{%.*}} = cir.exp2 {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.exp2.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.exp2.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_exp2(vd4);
-}
-
-void test_builtin_elementwise_log(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_log
- // LLVM-LABEL: test_builtin_elementwise_log
- // OGCG-LABEL: test_builtin_elementwise_log
- // CIR: {{%.*}} = cir.log {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.log.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.log.f32(float {{%.*}})
- f = __builtin_elementwise_log(f);
-
- // CIR: {{%.*}} = cir.log {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.log.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.log.f64(double {{%.*}})
- d = __builtin_elementwise_log(d);
-
- // CIR: {{%.*}} = cir.log {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.log.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.log.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_log(vf4);
-
- // CIR: {{%.*}} = cir.log {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.log.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.log.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_log(vd4);
-}
-
-void test_builtin_elementwise_log2(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_log2
- // LLVM-LABEL: test_builtin_elementwise_log2
- // OGCG-LABEL: test_builtin_elementwise_log2
- // CIR: {{%.*}} = cir.log2 {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.log2.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.log2.f32(float {{%.*}})
- f = __builtin_elementwise_log2(f);
-
- // CIR: {{%.*}} = cir.log2 {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.log2.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.log2.f64(double {{%.*}})
- d = __builtin_elementwise_log2(d);
-
- // CIR: {{%.*}} = cir.log2 {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.log2.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.log2.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_log2(vf4);
-
- // CIR: {{%.*}} = cir.log2 {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.log2.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.log2.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_log2(vd4);
-}
-
-void test_builtin_elementwise_log10(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_log10
- // LLVM-LABEL: test_builtin_elementwise_log10
- // OGCG-LABEL: test_builtin_elementwise_log10
- // CIR: {{%.*}} = cir.log10 {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.log10.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.log10.f32(float {{%.*}})
- f = __builtin_elementwise_log10(f);
-
- // CIR: {{%.*}} = cir.log10 {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.log10.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.log10.f64(double {{%.*}})
- d = __builtin_elementwise_log10(d);
-
- // CIR: {{%.*}} = cir.log10 {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.log10.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.log10.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_log10(vf4);
-
- // CIR: {{%.*}} = cir.log10 {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.log10.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.log10.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_log10(vd4);
-}
-
-void test_builtin_elementwise_cos(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_cos
- // LLVM-LABEL: test_builtin_elementwise_cos
- // OGCG-LABEL: test_builtin_elementwise_cos
- // CIR: {{%.*}} = cir.cos {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.cos.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.cos.f32(float {{%.*}})
- f = __builtin_elementwise_cos(f);
-
- // CIR: {{%.*}} = cir.cos {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.cos.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.cos.f64(double {{%.*}})
- d = __builtin_elementwise_cos(d);
-
- // CIR: {{%.*}} = cir.cos {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.cos.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.cos.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_cos(vf4);
-
- // CIR: {{%.*}} = cir.cos {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.cos.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.cos.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_cos(vd4);
-}
-
-void test_builtin_elementwise_floor(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_floor
- // LLVM-LABEL: test_builtin_elementwise_floor
- // OGCG-LABEL: test_builtin_elementwise_floor
- // CIR: {{%.*}} = cir.floor {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.floor.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.floor.f32(float {{%.*}})
- f = __builtin_elementwise_floor(f);
-
- // CIR: {{%.*}} = cir.floor {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.floor.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.floor.f64(double {{%.*}})
- d = __builtin_elementwise_floor(d);
-
- // CIR: {{%.*}} = cir.floor {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.floor.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.floor.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_floor(vf4);
-
- // CIR: {{%.*}} = cir.floor {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.floor.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.floor.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_floor(vd4);
-}
-
-void test_builtin_elementwise_round(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_round
- // LLVM-LABEL: test_builtin_elementwise_round
- // OGCG-LABEL: test_builtin_elementwise_round
- // CIR: {{%.*}} = cir.round {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.round.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.round.f32(float {{%.*}})
- f = __builtin_elementwise_round(f);
-
- // CIR: {{%.*}} = cir.round {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.round.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.round.f64(double {{%.*}})
- d = __builtin_elementwise_round(d);
-
- // CIR: {{%.*}} = cir.round {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.round.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.round.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_round(vf4);
-
- // CIR: {{%.*}} = cir.round {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.round.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.round.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_round(vd4);
-}
-
-void test_builtin_elementwise_rint(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_rint
- // LLVM-LABEL: test_builtin_elementwise_rint
- // OGCG-LABEL: test_builtin_elementwise_rint
- // CIR: {{%.*}} = cir.rint {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.rint.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.rint.f32(float {{%.*}})
- f = __builtin_elementwise_rint(f);
-
- // CIR: {{%.*}} = cir.rint {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.rint.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.rint.f64(double {{%.*}})
- d = __builtin_elementwise_rint(d);
-
- // CIR: {{%.*}} = cir.rint {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.rint.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.rint.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_rint(vf4);
-
- // CIR: {{%.*}} = cir.rint {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.rint.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.rint.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_rint(vd4);
-}
-
-void test_builtin_elementwise_nearbyint(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_nearbyint
- // LLVM-LABEL: test_builtin_elementwise_nearbyint
- // OGCG-LABEL: test_builtin_elementwise_nearbyint
- // CIR: {{%.*}} = cir.nearbyint {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.nearbyint.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.nearbyint.f32(float {{%.*}})
- f = __builtin_elementwise_nearbyint(f);
-
- // CIR: {{%.*}} = cir.nearbyint {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.nearbyint.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.nearbyint.f64(double {{%.*}})
- d = __builtin_elementwise_nearbyint(d);
-
- // CIR: {{%.*}} = cir.nearbyint {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_nearbyint(vf4);
-
- // CIR: {{%.*}} = cir.nearbyint {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_nearbyint(vd4);
-}
-
-void test_builtin_elementwise_sin(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_sin
- // LLVM-LABEL: test_builtin_elementwise_sin
- // OGCG-LABEL: test_builtin_elementwise_sin
- // CIR: {{%.*}} = cir.sin {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.sin.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.sin.f32(float {{%.*}})
- f = __builtin_elementwise_sin(f);
-
- // CIR: {{%.*}} = cir.sin {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.sin.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.sin.f64(double {{%.*}})
- d = __builtin_elementwise_sin(d);
-
- // CIR: {{%.*}} = cir.sin {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.sin.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.sin.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_sin(vf4);
-
- // CIR: {{%.*}} = cir.sin {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.sin.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.sin.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_sin(vd4);
-}
-
-void test_builtin_elementwise_sqrt(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_sqrt
- // LLVM-LABEL: test_builtin_elementwise_sqrt
- // OGCG-LABEL: test_builtin_elementwise_sqrt
- // CIR: {{%.*}} = cir.sqrt {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.sqrt.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.sqrt.f32(float {{%.*}})
- f = __builtin_elementwise_sqrt(f);
-
- // CIR: {{%.*}} = cir.sqrt {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.sqrt.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.sqrt.f64(double {{%.*}})
- d = __builtin_elementwise_sqrt(d);
-
- // CIR: {{%.*}} = cir.sqrt {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.sqrt.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.sqrt.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_sqrt(vf4);
-
- // CIR: {{%.*}} = cir.sqrt {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.sqrt.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.sqrt.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_sqrt(vd4);
-}
-
-void test_builtin_elementwise_tan(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_tan
- // LLVM-LABEL: test_builtin_elementwise_tan
- // OGCG-LABEL: test_builtin_elementwise_tan
- // CIR: {{%.*}} = cir.tan {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.tan.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.tan.f32(float {{%.*}})
- f = __builtin_elementwise_tan(f);
-
- // CIR: {{%.*}} = cir.tan {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.tan.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.tan.f64(double {{%.*}})
- d = __builtin_elementwise_tan(d);
-
- // CIR: {{%.*}} = cir.tan {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.tan.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.tan.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_tan(vf4);
-
- // CIR: {{%.*}} = cir.tan {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.tan.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.tan.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_tan(vd4);
-}
-
-void test_builtin_elementwise_trunc(float f, double d, vfloat4 vf4,
- vdouble4 vd4) {
- // CIR-LABEL: test_builtin_elementwise_trunc
- // LLVM-LABEL: test_builtin_elementwise_trunc
- // OGCG-LABEL: test_builtin_elementwise_trunc
- // CIR: {{%.*}} = cir.trunc {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.trunc.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.trunc.f32(float {{%.*}})
- f = __builtin_elementwise_trunc(f);
-
- // CIR: {{%.*}} = cir.trunc {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.trunc.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.trunc.f64(double {{%.*}})
- d = __builtin_elementwise_trunc(d);
-
- // CIR: {{%.*}} = cir.trunc {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.trunc.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.trunc.v4f32(<4 x float> {{%.*}})
- vf4 = __builtin_elementwise_trunc(vf4);
-
- // CIR: {{%.*}} = cir.trunc {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.trunc.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.trunc.v4f64(<4 x double> {{%.*}})
- vd4 = __builtin_elementwise_trunc(vd4);
-}
diff --git a/clang/test/CIR/CodeGen/address-of.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-address-of.cpp
similarity index 100%
rename from clang/test/CIR/CodeGen/address-of.cpp
rename to clang/test/CIR/CodeGenBuiltins/builtin-address-of.cpp
diff --git a/clang/test/CIR/CodeGen/builtin-bit-cast.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-bit-cast.cpp
similarity index 100%
rename from clang/test/CIR/CodeGen/builtin-bit-cast.cpp
rename to clang/test/CIR/CodeGenBuiltins/builtin-bit-cast.cpp
diff --git a/clang/test/CIR/CodeGen/builtin-floating-point.c b/clang/test/CIR/CodeGenBuiltins/builtin-floating-point.c
similarity index 100%
rename from clang/test/CIR/CodeGen/builtin-floating-point.c
rename to clang/test/CIR/CodeGenBuiltins/builtin-floating-point.c
diff --git a/clang/test/CIR/CodeGen/builtin-memchr.c b/clang/test/CIR/CodeGenBuiltins/builtin-memchr.c
similarity index 100%
rename from clang/test/CIR/CodeGen/builtin-memchr.c
rename to clang/test/CIR/CodeGenBuiltins/builtin-memchr.c
diff --git a/clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c b/clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c
index 80fc0682f8126..2325897a17a7f 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c
@@ -1,39 +1,77 @@
-// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
-// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
-// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
-// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -Wno-unused-value -emit-llvm %s -o %t.ll
-// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
+// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -emit-cir %s -o %t.cir
+// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
+// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -fclangir \
+// RUN: -emit-llvm %s -o %t.ll
+// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
+// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -emit-llvm %s -o %t-ogcg.ll
+// RUN: FileCheck --check-prefix=OGCG --input-file=%t-ogcg.ll %s
typedef int vint4 __attribute__((ext_vector_type(4)));
typedef short vshort8 __attribute__((ext_vector_type(8)));
typedef float vfloat4 __attribute__((ext_vector_type(4)));
typedef double vdouble4 __attribute__((ext_vector_type(4)));
+void test_builtin_elementwise_abs(vint4 vi4, int i, float f, double d,
+ vfloat4 vf4, vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_abs
+ // LLVM-LABEL: test_builtin_elementwise_abs
+ // OGCG-LABEL: test_builtin_elementwise_abs
+
+ // CIR: {{%.*}} = cir.fabs {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.fabs.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.fabs.f32(float {{%.*}})
+ f = __builtin_elementwise_abs(f);
+
+ // CIR: {{%.*}} = cir.fabs {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.fabs.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.fabs.f64(double {{%.*}})
+ d = __builtin_elementwise_abs(d);
+
+ // CIR: {{%.*}} = cir.abs {{%.*}} : !cir.vector<4 x !s32i>
+ // LLVM: {{%.*}} = call <4 x i32> @llvm.abs.v4i32(<4 x i32> {{%.*}}, i1 false)
+ // OGCG: {{%.*}} = call <4 x i32> @llvm.abs.v4i32(<4 x i32> {{%.*}}, i1 false)
+ vi4 = __builtin_elementwise_abs(vi4);
+
+ // CIR: {{%.*}} = cir.abs {{%.*}} : !s32
+ // LLVM: {{%.*}} = call i32 @llvm.abs.i32(i32 {{%.*}}, i1 false)
+ // OGCG: {{%.*}} = call i32 @llvm.abs.i32(i32 {{%.*}}, i1 false)
+ i = __builtin_elementwise_abs(i);
+
+ // CIR: {{%.*}} = cir.fabs {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.fabs.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.fabs.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_abs(vf4);
+
+ // CIR: {{%.*}} = cir.fabs {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.fabs.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.fabs.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_abs(vd4);
+}
+
void test_builtin_elementwise_acos(float f, double d, vfloat4 vf4,
vdouble4 vd4) {
// CIR-LABEL: test_builtin_elementwise_acos
// LLVM-LABEL: test_builtin_elementwise_acos
// OGCG-LABEL: test_builtin_elementwise_acos
-
- // CIR: %{{.*}} = cir.acos %{{.*}} : !cir.float
- // LLVM: %{{.*}} = call float @llvm.acos.f32(float %{{.*}})
- // OGCG: %{{.*}} = call float @llvm.acos.f32(float %{{.*}})
+
+ // CIR: {{%.*}} = cir.acos {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.acos.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.acos.f32(float {{%.*}})
f = __builtin_elementwise_acos(f);
- // CIR: %{{.*}} = cir.acos %{{.*}} : !cir.double
- // LLVM: %{{.*}} = call double @llvm.acos.f64(double %{{.*}})
- // OGCG: %{{.*}} = call double @llvm.acos.f64(double %{{.*}})
+ // CIR: {{%.*}} = cir.acos {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.acos.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.acos.f64(double {{%.*}})
d = __builtin_elementwise_acos(d);
- // CIR: %{{.*}} = cir.acos %{{.*}} : !cir.vector<4 x !cir.float>
- // LLVM: %{{.*}} = call <4 x float> @llvm.acos.v4f32(<4 x float> %{{.*}})
- // OGCG: %{{.*}} = call <4 x float> @llvm.acos.v4f32(<4 x float> %{{.*}})
+ // CIR: {{%.*}} = cir.acos {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.acos.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.acos.v4f32(<4 x float> {{%.*}})
vf4 = __builtin_elementwise_acos(vf4);
- // CIR: %{{.*}} = cir.acos %{{.*}} : !cir.vector<4 x !cir.double>
- // LLVM: %{{.*}} = call <4 x double> @llvm.acos.v4f64(<4 x double> %{{.*}})
- // OGCG: %{{.*}} = call <4 x double> @llvm.acos.v4f64(<4 x double> %{{.*}})
+ // CIR: {{%.*}} = cir.acos {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.acos.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.acos.v4f64(<4 x double> {{%.*}})
vd4 = __builtin_elementwise_acos(vd4);
}
@@ -43,24 +81,24 @@ void test_builtin_elementwise_asin(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_asin
// OGCG-LABEL: test_builtin_elementwise_asin
- // CIR: %{{.*}} = cir.asin %{{.*}} : !cir.float
- // LLVM: %{{.*}} = call float @llvm.asin.f32(float %{{.*}})
- // OGCG: %{{.*}} = call float @llvm.asin.f32(float %{{.*}})
+ // CIR: {{%.*}} = cir.asin {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.asin.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.asin.f32(float {{%.*}})
f = __builtin_elementwise_asin(f);
- // CIR: %{{.*}} = cir.asin %{{.*}} : !cir.double
- // LLVM: %{{.*}} = call double @llvm.asin.f64(double %{{.*}})
- // OGCG: %{{.*}} = call double @llvm.asin.f64(double %{{.*}})
+ // CIR: {{%.*}} = cir.asin {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.asin.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.asin.f64(double {{%.*}})
d = __builtin_elementwise_asin(d);
- // CIR: %{{.*}} = cir.asin %{{.*}} : !cir.vector<4 x !cir.float>
- // LLVM: %{{.*}} = call <4 x float> @llvm.asin.v4f32(<4 x float> %{{.*}})
- // OGCG: %{{.*}} = call <4 x float> @llvm.asin.v4f32(<4 x float> %{{.*}})
+ // CIR: {{%.*}} = cir.asin {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.asin.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.asin.v4f32(<4 x float> {{%.*}})
vf4 = __builtin_elementwise_asin(vf4);
- // CIR: %{{.*}} = cir.asin %{{.*}} : !cir.vector<4 x !cir.double>
- // LLVM: %{{.*}} = call <4 x double> @llvm.asin.v4f64(<4 x double> %{{.*}})
- // OGCG: %{{.*}} = call <4 x double> @llvm.asin.v4f64(<4 x double> %{{.*}})
+ // CIR: {{%.*}} = cir.asin {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.asin.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.asin.v4f64(<4 x double> {{%.*}})
vd4 = __builtin_elementwise_asin(vd4);
}
@@ -70,27 +108,189 @@ void test_builtin_elementwise_atan(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_atan
// OGCG-LABEL: test_builtin_elementwise_atan
- // CIR: %{{.*}} = cir.atan %{{.*}} : !cir.float
- // LLVM: %{{.*}} = call float @llvm.atan.f32(float %{{.*}})
- // OGCG: %{{.*}} = call float @llvm.atan.f32(float %{{.*}})
+ // CIR: {{%.*}} = cir.atan {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.atan.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.atan.f32(float {{%.*}})
f = __builtin_elementwise_atan(f);
- // CIR: %{{.*}} = cir.atan %{{.*}} : !cir.double
- // LLVM: %{{.*}} = call double @llvm.atan.f64(double %{{.*}})
- // OGCG: %{{.*}} = call double @llvm.atan.f64(double %{{.*}})
+ // CIR: {{%.*}} = cir.atan {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.atan.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.atan.f64(double {{%.*}})
d = __builtin_elementwise_atan(d);
- // CIR: %{{.*}} = cir.atan %{{.*}} : !cir.vector<4 x !cir.float>
- // LLVM: %{{.*}} = call <4 x float> @llvm.atan.v4f32(<4 x float> %{{.*}})
- // OGCG: %{{.*}} = call <4 x float> @llvm.atan.v4f32(<4 x float> %{{.*}})
+ // CIR: {{%.*}} = cir.atan {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.atan.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.atan.v4f32(<4 x float> {{%.*}})
vf4 = __builtin_elementwise_atan(vf4);
- // CIR: %{{.*}} = cir.atan %{{.*}} : !cir.vector<4 x !cir.double>
- // LLVM: %{{.*}} = call <4 x double> @llvm.atan.v4f64(<4 x double> %{{.*}})
- // OGCG: %{{.*}} = call <4 x double> @llvm.atan.v4f64(<4 x double> %{{.*}})
+ // CIR: {{%.*}} = cir.atan {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.atan.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.atan.v4f64(<4 x double> {{%.*}})
vd4 = __builtin_elementwise_atan(vd4);
}
+void test_builtin_elementwise_atan2(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_atan2
+ // LLVM-LABEL: test_builtin_elementwise_atan2
+ // OGCG-LABEL: test_builtin_elementwise_atan2
+
+ // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.atan2.f32(float {{%.*}}, float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.atan2.f32(float {{%.*}}, float {{%.*}})
+ f = __builtin_elementwise_atan2(f, f);
+
+ // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.atan2.f64(double {{%.*}}, double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.atan2.f64(double {{%.*}}, double {{%.*}})
+ d = __builtin_elementwise_atan2(d, d);
+
+ // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.atan2.v4f32(<4 x float> {{%.*}}, <4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.atan2.v4f32(<4 x float> {{%.*}}, <4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_atan2(vf4, vf4);
+
+ // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.atan2.v4f64(<4 x double> {{%.*}}, <4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.atan2.v4f64(<4 x double> {{%.*}}, <4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_atan2(vd4, vd4);
+}
+
+void test_builtin_elementwise_exp(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_exp
+ // LLVM-LABEL: test_builtin_elementwise_exp
+ // OGCG-LABEL: test_builtin_elementwise_exp
+
+ // CIR: {{%.*}} = cir.exp {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.exp.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.exp.f32(float {{%.*}})
+ f = __builtin_elementwise_exp(f);
+
+ // CIR: {{%.*}} = cir.exp {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.exp.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.exp.f64(double {{%.*}})
+ d = __builtin_elementwise_exp(d);
+
+ // CIR: {{%.*}} = cir.exp {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.exp.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.exp.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_exp(vf4);
+
+ // CIR: {{%.*}} = cir.exp {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.exp.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.exp.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_exp(vd4);
+}
+
+void test_builtin_elementwise_exp2(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_exp2
+ // LLVM-LABEL: test_builtin_elementwise_exp2
+ // OGCG-LABEL: test_builtin_elementwise_exp2
+
+ // CIR: {{%.*}} = cir.exp2 {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.exp2.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.exp2.f32(float {{%.*}})
+ f = __builtin_elementwise_exp2(f);
+
+ // CIR: {{%.*}} = cir.exp2 {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.exp2.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.exp2.f64(double {{%.*}})
+ d = __builtin_elementwise_exp2(d);
+
+ // CIR: {{%.*}} = cir.exp2 {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.exp2.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.exp2.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_exp2(vf4);
+
+ // CIR: {{%.*}} = cir.exp2 {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.exp2.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.exp2.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_exp2(vd4);
+}
+
+void test_builtin_elementwise_log(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_log
+ // LLVM-LABEL: test_builtin_elementwise_log
+ // OGCG-LABEL: test_builtin_elementwise_log
+
+ // CIR: {{%.*}} = cir.log {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.log.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.log.f32(float {{%.*}})
+ f = __builtin_elementwise_log(f);
+
+ // CIR: {{%.*}} = cir.log {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.log.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.log.f64(double {{%.*}})
+ d = __builtin_elementwise_log(d);
+
+ // CIR: {{%.*}} = cir.log {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.log.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.log.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_log(vf4);
+
+ // CIR: {{%.*}} = cir.log {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.log.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.log.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_log(vd4);
+}
+
+void test_builtin_elementwise_log2(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_log2
+ // LLVM-LABEL: test_builtin_elementwise_log2
+ // OGCG-LABEL: test_builtin_elementwise_log2
+
+ // CIR: {{%.*}} = cir.log2 {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.log2.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.log2.f32(float {{%.*}})
+ f = __builtin_elementwise_log2(f);
+
+ // CIR: {{%.*}} = cir.log2 {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.log2.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.log2.f64(double {{%.*}})
+ d = __builtin_elementwise_log2(d);
+
+ // CIR: {{%.*}} = cir.log2 {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.log2.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.log2.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_log2(vf4);
+
+ // CIR: {{%.*}} = cir.log2 {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.log2.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.log2.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_log2(vd4);
+}
+
+void test_builtin_elementwise_log10(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_log10
+ // LLVM-LABEL: test_builtin_elementwise_log10
+ // OGCG-LABEL: test_builtin_elementwise_log10
+
+ // CIR: {{%.*}} = cir.log10 {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.log10.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.log10.f32(float {{%.*}})
+ f = __builtin_elementwise_log10(f);
+
+ // CIR: {{%.*}} = cir.log10 {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.log10.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.log10.f64(double {{%.*}})
+ d = __builtin_elementwise_log10(d);
+
+ // CIR: {{%.*}} = cir.log10 {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.log10.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.log10.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_log10(vf4);
+
+ // CIR: {{%.*}} = cir.log10 {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.log10.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.log10.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_log10(vd4);
+}
+
void test_builtin_elementwise_cos(float f, double d, vfloat4 vf4,
vdouble4 vd4) {
// CIR-LABEL: test_builtin_elementwise_cos
@@ -118,6 +318,223 @@ void test_builtin_elementwise_cos(float f, double d, vfloat4 vf4,
vd4 = __builtin_elementwise_cos(vd4);
}
+void test_builtin_elementwise_floor(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_floor
+ // LLVM-LABEL: test_builtin_elementwise_floor
+ // OGCG-LABEL: test_builtin_elementwise_floor
+
+ // CIR: {{%.*}} = cir.floor {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.floor.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.floor.f32(float {{%.*}})
+ f = __builtin_elementwise_floor(f);
+
+ // CIR: {{%.*}} = cir.floor {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.floor.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.floor.f64(double {{%.*}})
+ d = __builtin_elementwise_floor(d);
+
+ // CIR: {{%.*}} = cir.floor {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.floor.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.floor.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_floor(vf4);
+
+ // CIR: {{%.*}} = cir.floor {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.floor.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.floor.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_floor(vd4);
+}
+
+void test_builtin_elementwise_round(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_round
+ // LLVM-LABEL: test_builtin_elementwise_round
+ // OGCG-LABEL: test_builtin_elementwise_round
+
+ // CIR: {{%.*}} = cir.round {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.round.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.round.f32(float {{%.*}})
+ f = __builtin_elementwise_round(f);
+
+ // CIR: {{%.*}} = cir.round {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.round.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.round.f64(double {{%.*}})
+ d = __builtin_elementwise_round(d);
+
+ // CIR: {{%.*}} = cir.round {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.round.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.round.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_round(vf4);
+
+ // CIR: {{%.*}} = cir.round {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.round.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.round.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_round(vd4);
+}
+
+void test_builtin_elementwise_rint(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_rint
+ // LLVM-LABEL: test_builtin_elementwise_rint
+ // OGCG-LABEL: test_builtin_elementwise_rint
+
+ // CIR: {{%.*}} = cir.rint {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.rint.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.rint.f32(float {{%.*}})
+ f = __builtin_elementwise_rint(f);
+
+ // CIR: {{%.*}} = cir.rint {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.rint.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.rint.f64(double {{%.*}})
+ d = __builtin_elementwise_rint(d);
+
+ // CIR: {{%.*}} = cir.rint {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.rint.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.rint.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_rint(vf4);
+
+ // CIR: {{%.*}} = cir.rint {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.rint.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.rint.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_rint(vd4);
+}
+
+void test_builtin_elementwise_nearbyint(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_nearbyint
+ // LLVM-LABEL: test_builtin_elementwise_nearbyint
+ // OGCG-LABEL: test_builtin_elementwise_nearbyint
+
+ // CIR: {{%.*}} = cir.nearbyint {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.nearbyint.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.nearbyint.f32(float {{%.*}})
+ f = __builtin_elementwise_nearbyint(f);
+
+ // CIR: {{%.*}} = cir.nearbyint {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.nearbyint.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.nearbyint.f64(double {{%.*}})
+ d = __builtin_elementwise_nearbyint(d);
+
+ // CIR: {{%.*}} = cir.nearbyint {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_nearbyint(vf4);
+
+ // CIR: {{%.*}} = cir.nearbyint {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_nearbyint(vd4);
+}
+
+void test_builtin_elementwise_sin(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_sin
+ // LLVM-LABEL: test_builtin_elementwise_sin
+ // OGCG-LABEL: test_builtin_elementwise_sin
+
+ // CIR: {{%.*}} = cir.sin {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.sin.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.sin.f32(float {{%.*}})
+ f = __builtin_elementwise_sin(f);
+
+ // CIR: {{%.*}} = cir.sin {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.sin.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.sin.f64(double {{%.*}})
+ d = __builtin_elementwise_sin(d);
+
+ // CIR: {{%.*}} = cir.sin {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.sin.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.sin.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_sin(vf4);
+
+ // CIR: {{%.*}} = cir.sin {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.sin.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.sin.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_sin(vd4);
+}
+
+void test_builtin_elementwise_sqrt(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_sqrt
+ // LLVM-LABEL: test_builtin_elementwise_sqrt
+ // OGCG-LABEL: test_builtin_elementwise_sqrt
+
+ // CIR: {{%.*}} = cir.sqrt {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.sqrt.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.sqrt.f32(float {{%.*}})
+ f = __builtin_elementwise_sqrt(f);
+
+ // CIR: {{%.*}} = cir.sqrt {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.sqrt.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.sqrt.f64(double {{%.*}})
+ d = __builtin_elementwise_sqrt(d);
+
+ // CIR: {{%.*}} = cir.sqrt {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.sqrt.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.sqrt.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_sqrt(vf4);
+
+ // CIR: {{%.*}} = cir.sqrt {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.sqrt.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.sqrt.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_sqrt(vd4);
+}
+
+void test_builtin_elementwise_tan(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_tan
+ // LLVM-LABEL: test_builtin_elementwise_tan
+ // OGCG-LABEL: test_builtin_elementwise_tan
+
+ // CIR: {{%.*}} = cir.tan {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.tan.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.tan.f32(float {{%.*}})
+ f = __builtin_elementwise_tan(f);
+
+ // CIR: {{%.*}} = cir.tan {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.tan.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.tan.f64(double {{%.*}})
+ d = __builtin_elementwise_tan(d);
+
+ // CIR: {{%.*}} = cir.tan {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.tan.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.tan.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_tan(vf4);
+
+ // CIR: {{%.*}} = cir.tan {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.tan.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.tan.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_tan(vd4);
+}
+
+void test_builtin_elementwise_trunc(float f, double d, vfloat4 vf4,
+ vdouble4 vd4) {
+ // CIR-LABEL: test_builtin_elementwise_trunc
+ // LLVM-LABEL: test_builtin_elementwise_trunc
+ // OGCG-LABEL: test_builtin_elementwise_trunc
+
+ // CIR: {{%.*}} = cir.trunc {{%.*}} : !cir.float
+ // LLVM: {{%.*}} = call float @llvm.trunc.f32(float {{%.*}})
+ // OGCG: {{%.*}} = call float @llvm.trunc.f32(float {{%.*}})
+ f = __builtin_elementwise_trunc(f);
+
+ // CIR: {{%.*}} = cir.trunc {{%.*}} : !cir.double
+ // LLVM: {{%.*}} = call double @llvm.trunc.f64(double {{%.*}})
+ // OGCG: {{%.*}} = call double @llvm.trunc.f64(double {{%.*}})
+ d = __builtin_elementwise_trunc(d);
+
+ // CIR: {{%.*}} = cir.trunc {{%.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: {{%.*}} = call <4 x float> @llvm.trunc.v4f32(<4 x float> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x float> @llvm.trunc.v4f32(<4 x float> {{%.*}})
+ vf4 = __builtin_elementwise_trunc(vf4);
+
+ // CIR: {{%.*}} = cir.trunc {{%.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: {{%.*}} = call <4 x double> @llvm.trunc.v4f64(<4 x double> {{%.*}})
+ // OGCG: {{%.*}} = call <4 x double> @llvm.trunc.v4f64(<4 x double> {{%.*}})
+ vd4 = __builtin_elementwise_trunc(vd4);
+}
+
+
void test_builtin_elementwise_fshl(long long int i1, long long int i2,
long long int i3, unsigned short us1,
unsigned short us2, unsigned short us3,
>From 26359698f12119467752e61ba3ff05917a41a927 Mon Sep 17 00:00:00 2001
From: Ayokunle Amodu <ayokunle321 at gmail.com>
Date: Thu, 26 Feb 2026 12:34:09 -0700
Subject: [PATCH 2/7] move address of
---
.../builtin-address-of.cpp => CodeGen/address-of.cpp} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename clang/test/CIR/{CodeGenBuiltins/builtin-address-of.cpp => CodeGen/address-of.cpp} (100%)
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-address-of.cpp b/clang/test/CIR/CodeGen/address-of.cpp
similarity index 100%
rename from clang/test/CIR/CodeGenBuiltins/builtin-address-of.cpp
rename to clang/test/CIR/CodeGen/address-of.cpp
>From d6ff502ee514a9716b7f993fc1bf1f9db0092e32 Mon Sep 17 00:00:00 2001
From: Ayokunle Amodu <ayokunle321 at gmail.com>
Date: Thu, 26 Feb 2026 13:17:55 -0700
Subject: [PATCH 3/7] move some more files
---
.../address-of.cpp => CodeGenBuiltins/builtin-address-of.cpp} | 0
.../object-size.c => CodeGenBuiltins/builtin-object-size.c} | 0
.../object-size.cpp => CodeGenBuiltins/builtin-object-size.cpp} | 0
3 files changed, 0 insertions(+), 0 deletions(-)
rename clang/test/CIR/{CodeGen/address-of.cpp => CodeGenBuiltins/builtin-address-of.cpp} (100%)
rename clang/test/CIR/{CodeGen/object-size.c => CodeGenBuiltins/builtin-object-size.c} (100%)
rename clang/test/CIR/{CodeGen/object-size.cpp => CodeGenBuiltins/builtin-object-size.cpp} (100%)
diff --git a/clang/test/CIR/CodeGen/address-of.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-address-of.cpp
similarity index 100%
rename from clang/test/CIR/CodeGen/address-of.cpp
rename to clang/test/CIR/CodeGenBuiltins/builtin-address-of.cpp
diff --git a/clang/test/CIR/CodeGen/object-size.c b/clang/test/CIR/CodeGenBuiltins/builtin-object-size.c
similarity index 100%
rename from clang/test/CIR/CodeGen/object-size.c
rename to clang/test/CIR/CodeGenBuiltins/builtin-object-size.c
diff --git a/clang/test/CIR/CodeGen/object-size.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-object-size.cpp
similarity index 100%
rename from clang/test/CIR/CodeGen/object-size.cpp
rename to clang/test/CIR/CodeGenBuiltins/builtin-object-size.cpp
>From 46b9987d4f0dbdaf1b998de251f612c53310f309 Mon Sep 17 00:00:00 2001
From: Ayokunle Amodu <ayokunle321 at gmail.com>
Date: Thu, 26 Feb 2026 13:23:41 -0700
Subject: [PATCH 4/7] move some more
---
.../offset-of.cpp => CodeGenBuiltins/builtin-offset-of.cpp} | 0
.../pred-info-builtins.c => CodeGenBuiltins/builtins-pred-info.c} | 0
2 files changed, 0 insertions(+), 0 deletions(-)
rename clang/test/CIR/{CodeGen/offset-of.cpp => CodeGenBuiltins/builtin-offset-of.cpp} (100%)
rename clang/test/CIR/{CodeGen/pred-info-builtins.c => CodeGenBuiltins/builtins-pred-info.c} (100%)
diff --git a/clang/test/CIR/CodeGen/offset-of.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-offset-of.cpp
similarity index 100%
rename from clang/test/CIR/CodeGen/offset-of.cpp
rename to clang/test/CIR/CodeGenBuiltins/builtin-offset-of.cpp
diff --git a/clang/test/CIR/CodeGen/pred-info-builtins.c b/clang/test/CIR/CodeGenBuiltins/builtins-pred-info.c
similarity index 100%
rename from clang/test/CIR/CodeGen/pred-info-builtins.c
rename to clang/test/CIR/CodeGenBuiltins/builtins-pred-info.c
>From 65bee77dfebf8890b6c04feeb0051d3282277fe1 Mon Sep 17 00:00:00 2001
From: Ayokunle Amodu <ayokunle321 at gmail.com>
Date: Thu, 26 Feb 2026 14:23:45 -0700
Subject: [PATCH 5/7] remove duplicate fp tests
---
.../CodeGenBuiltins/builtin-floating-point.c | 2212 ----------------
.../CodeGenBuiltins/builtins-floating-point.c | 2230 ++++++++++++++++-
2 files changed, 2176 insertions(+), 2266 deletions(-)
delete mode 100644 clang/test/CIR/CodeGenBuiltins/builtin-floating-point.c
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-floating-point.c b/clang/test/CIR/CodeGenBuiltins/builtin-floating-point.c
deleted file mode 100644
index 2220630272063..0000000000000
--- a/clang/test/CIR/CodeGenBuiltins/builtin-floating-point.c
+++ /dev/null
@@ -1,2212 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
-// RUN: FileCheck --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple aarch64-apple-darwin-macho -fclangir -emit-cir %s -o %t-aarch64.cir
-// RUN: FileCheck --input-file=%t-aarch64.cir %s --check-prefix=AARCH64
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm -o %t.ll %s
-// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -o %t-ogcg.ll %s
-// RUN: FileCheck --input-file=%t-ogcg.ll %s --check-prefix=OGCG
-
-// lround
-
-long my_lroundf(float f) {
- return __builtin_lroundf(f);
- // CHECK: cir.func no_inline dso_local @my_lroundf
- // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.float -> !s64i
-
- // LLVM: define dso_local i64 @my_lroundf
- // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_lroundf(
- // OGCG: call i64 @llvm.lround.i64.f32(
-}
-
-long my_lround(double f) {
- return __builtin_lround(f);
- // CHECK: cir.func no_inline dso_local @my_lround
- // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.double -> !s64i
-
- // LLVM: define dso_local i64 @my_lround
- // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_lround(
- // OGCG: call i64 @llvm.lround.i64.f64(
-}
-
-long my_lroundl(long double f) {
- return __builtin_lroundl(f);
- // CHECK: cir.func no_inline dso_local @my_lroundl
- // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.lround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
-
- // LLVM: define dso_local i64 @my_lroundl
- // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_lroundl(
- // OGCG: call i64 @llvm.lround.i64.f80(
-}
-
-long lroundf(float);
-long lround(double);
-long lroundl(long double);
-
-long call_lroundf(float f) {
- return lroundf(f);
- // CHECK: cir.func no_inline dso_local @call_lroundf
- // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.float -> !s64i
-
- // LLVM: define dso_local i64 @call_lroundf
- // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_lroundf(
- // OGCG: call i64 @llvm.lround.i64.f32(
-}
-
-long call_lround(double f) {
- return lround(f);
- // CHECK: cir.func no_inline dso_local @call_lround
- // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.double -> !s64i
-
- // LLVM: define dso_local i64 @call_lround
- // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_lround(
- // OGCG: call i64 @llvm.lround.i64.f64(
-}
-
-long call_lroundl(long double f) {
- return lroundl(f);
- // CHECK: cir.func no_inline dso_local @call_lroundl
- // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.lround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
-
- // LLVM: define dso_local i64 @call_lroundl
- // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_lroundl(
- // OGCG: call i64 @llvm.lround.i64.f80(
-}
-
-// llround
-
-long long my_llroundf(float f) {
- return __builtin_llroundf(f);
- // CHECK: cir.func no_inline dso_local @my_llroundf
- // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.float -> !s64i
-
- // LLVM: define dso_local i64 @my_llroundf
- // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_llroundf(
- // OGCG: call i64 @llvm.llround.i64.f32(
-}
-
-long long my_llround(double f) {
- return __builtin_llround(f);
- // CHECK: cir.func no_inline dso_local @my_llround
- // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.double -> !s64i
-
- // LLVM: define dso_local i64 @my_llround
- // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_llround(
- // OGCG: call i64 @llvm.llround.i64.f64(
-}
-
-long long my_llroundl(long double f) {
- return __builtin_llroundl(f);
- // CHECK: cir.func no_inline dso_local @my_llroundl
- // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.llround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
-
- // LLVM: define dso_local i64 @my_llroundl
- // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_llroundl(
- // OGCG: call i64 @llvm.llround.i64.f80(
-}
-
-long long llroundf(float);
-long long llround(double);
-long long llroundl(long double);
-
-long long call_llroundf(float f) {
- return llroundf(f);
- // CHECK: cir.func no_inline dso_local @call_llroundf
- // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.float -> !s64i
-
- // LLVM: define dso_local i64 @call_llroundf
- // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_llroundf(
- // OGCG: call i64 @llvm.llround.i64.f32(
-}
-
-long long call_llround(double f) {
- return llround(f);
- // CHECK: cir.func no_inline dso_local @call_llround
- // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.double -> !s64i
-
- // LLVM: define dso_local i64 @call_llround
- // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_llround(
- // OGCG: call i64 @llvm.llround.i64.f64(
-}
-
-long long call_llroundl(long double f) {
- return llroundl(f);
- // CHECK: cir.func no_inline dso_local @call_llroundl
- // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.llround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
-
- // LLVM: define dso_local i64 @call_llroundl
- // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_llroundl(
- // OGCG: call i64 @llvm.llround.i64.f80(
-}
-
-// lrint
-
-long my_lrintf(float f) {
- return __builtin_lrintf(f);
- // CHECK: cir.func no_inline dso_local @my_lrintf
- // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.float -> !s64i
-
- // LLVM: define dso_local i64 @my_lrintf
- // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_lrintf(
- // OGCG: call i64 @llvm.lrint.i64.f32(
-}
-
-long my_lrint(double f) {
- return __builtin_lrint(f);
- // CHECK: cir.func no_inline dso_local @my_lrint
- // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.double -> !s64i
-
- // LLVM: define dso_local i64 @my_lrint
- // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_lrint(
- // OGCG: call i64 @llvm.lrint.i64.f64(
-}
-
-long my_lrintl(long double f) {
- return __builtin_lrintl(f);
- // CHECK: cir.func no_inline dso_local @my_lrintl
- // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
-
- // LLVM: define dso_local i64 @my_lrintl
- // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_lrintl(
- // OGCG: call i64 @llvm.lrint.i64.f80(
-}
-
-long lrintf(float);
-long lrint(double);
-long lrintl(long double);
-
-long call_lrintf(float f) {
- return lrintf(f);
- // CHECK: cir.func no_inline dso_local @call_lrintf
- // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.float -> !s64i
-
- // LLVM: define dso_local i64 @call_lrintf
- // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_lrintf(
- // OGCG: call i64 @llvm.lrint.i64.f32(
-}
-
-long call_lrint(double f) {
- return lrint(f);
- // CHECK: cir.func no_inline dso_local @call_lrint
- // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.double -> !s64i
-
- // LLVM: define dso_local i64 @call_lrint
- // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_lrint(
- // OGCG: call i64 @llvm.lrint.i64.f64(
-}
-
-long call_lrintl(long double f) {
- return lrintl(f);
- // CHECK: cir.func no_inline dso_local @call_lrintl
- // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
-
- // LLVM: define dso_local i64 @call_lrintl
- // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_lrintl(
- // OGCG: call i64 @llvm.lrint.i64.f80(
-}
-
-// llrint
-
-long long my_llrintf(float f) {
- return __builtin_llrintf(f);
- // CHECK: cir.func no_inline dso_local @my_llrintf
- // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.float -> !s64i
-
- // LLVM: define dso_local i64 @my_llrintf
- // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_llrintf(
- // OGCG: call i64 @llvm.llrint.i64.f32(
-}
-
-long long my_llrint(double f) {
- return __builtin_llrint(f);
- // CHECK: cir.func no_inline dso_local @my_llrint
- // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.double -> !s64i
-
- // LLVM: define dso_local i64 @my_llrint
- // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_llrint(
- // OGCG: call i64 @llvm.llrint.i64.f64(
-}
-
-long long my_llrintl(long double f) {
- return __builtin_llrintl(f);
- // CHECK: cir.func no_inline dso_local @my_llrintl
- // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
-
- // LLVM: define dso_local i64 @my_llrintl
- // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_llrintl(
- // OGCG: call i64 @llvm.llrint.i64.f80(
-}
-
-long long llrintf(float);
-long long llrint(double);
-long long llrintl(long double);
-
-long long call_llrintf(float f) {
- return llrintf(f);
- // CHECK: cir.func no_inline dso_local @call_llrintf
- // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.float -> !s64i
-
- // LLVM: define dso_local i64 @call_llrintf
- // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_llrintf(
- // OGCG: call i64 @llvm.llrint.i64.f32(
-}
-
-long long call_llrint(double f) {
- return llrint(f);
- // CHECK: cir.func no_inline dso_local @call_llrint
- // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.double -> !s64i
-
- // LLVM: define dso_local i64 @call_llrint
- // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_llrint(
- // OGCG: call i64 @llvm.llrint.i64.f64(
-}
-
-long long call_llrintl(long double f) {
- return llrintl(f);
- // CHECK: cir.func no_inline dso_local @call_llrintl
- // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
-
- // LLVM: define dso_local i64 @call_llrintl
- // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_llrintl(
- // OGCG: call i64 @llvm.llrint.i64.f80(
-}
-
-// ceil
-
-float my_ceilf(float f) {
- return __builtin_ceilf(f);
- // CHECK: cir.func no_inline dso_local @my_ceilf
- // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_ceilf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.ceil.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_ceilf(
- // OGCG: call float @llvm.ceil.f32(
-}
-
-double my_ceil(double f) {
- return __builtin_ceil(f);
- // CHECK: cir.func no_inline dso_local @my_ceil
- // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_ceil(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.ceil.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_ceil(
- // OGCG: call double @llvm.ceil.f64(
-}
-
-long double my_ceill(long double f) {
- return __builtin_ceill(f);
- // CHECK: cir.func no_inline dso_local @my_ceill
- // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_ceill(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.ceil.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_ceill(
- // OGCG: call x86_fp80 @llvm.ceil.f80(
-}
-
-float ceilf(float);
-double ceil(double);
-long double ceill(long double);
-
-float call_ceilf(float f) {
- return ceilf(f);
- // CHECK: cir.func no_inline dso_local @call_ceilf
- // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_ceilf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.ceil.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_ceilf(
- // OGCG: call float @llvm.ceil.f32(
-}
-
-double call_ceil(double f) {
- return ceil(f);
- // CHECK: cir.func no_inline dso_local @call_ceil
- // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_ceil(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.ceil.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_ceil(
- // OGCG: call double @llvm.ceil.f64(
-}
-
-long double call_ceill(long double f) {
- return ceill(f);
- // CHECK: cir.func no_inline dso_local @call_ceill
- // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_ceill(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.ceil.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_ceill(
- // OGCG: call x86_fp80 @llvm.ceil.f80(
-}
-
-// cos
-
-float my_cosf(float f) {
- return __builtin_cosf(f);
- // CHECK: cir.func no_inline dso_local @my_cosf
- // CHECK: {{.+}} = cir.cos {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_cosf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.cos.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_cosf(
- // OGCG: call float @llvm.cos.f32(
-}
-
-double my_cos(double f) {
- return __builtin_cos(f);
- // CHECK: cir.func no_inline dso_local @my_cos
- // CHECK: {{.+}} = cir.cos {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_cos(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.cos.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_cos(
- // OGCG: call double @llvm.cos.f64(
-}
-
-long double my_cosl(long double f) {
- return __builtin_cosl(f);
- // CHECK: cir.func no_inline dso_local @my_cosl
- // CHECK: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_cosl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.cos.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_cosl(
- // OGCG: call x86_fp80 @llvm.cos.f80(
-}
-
-float cosf(float);
-double cos(double);
-long double cosl(long double);
-
-float call_cosf(float f) {
- return cosf(f);
- // CHECK: cir.func no_inline dso_local @call_cosf
- // CHECK: {{.+}} = cir.cos {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_cosf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.cos.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_cosf(
- // OGCG: call float @llvm.cos.f32(
-}
-
-double call_cos(double f) {
- return cos(f);
- // CHECK: cir.func no_inline dso_local @call_cos
- // CHECK: {{.+}} = cir.cos {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_cos(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.cos.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_cos(
- // OGCG: call double @llvm.cos.f64(
-}
-
-long double call_cosl(long double f) {
- return cosl(f);
- // CHECK: cir.func no_inline dso_local @call_cosl
- // CHECK: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_cosl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.cos.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_cosl(
- // OGCG: call x86_fp80 @llvm.cos.f80(
-}
-
-// exp
-
-float my_expf(float f) {
- return __builtin_expf(f);
- // CHECK: cir.func no_inline dso_local @my_expf
- // CHECK: {{.+}} = cir.exp {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_expf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.exp.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_expf(
- // OGCG: call float @llvm.exp.f32(
-}
-
-double my_exp(double f) {
- return __builtin_exp(f);
- // CHECK: cir.func no_inline dso_local @my_exp
- // CHECK: {{.+}} = cir.exp {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_exp(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.exp.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_exp(
- // OGCG: call double @llvm.exp.f64(
-}
-
-long double my_expl(long double f) {
- return __builtin_expl(f);
- // CHECK: cir.func no_inline dso_local @my_expl
- // CHECK: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_expl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.exp.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_expl(
- // OGCG: call x86_fp80 @llvm.exp.f80(
-}
-
-float expf(float);
-double exp(double);
-long double expl(long double);
-
-float call_expf(float f) {
- return expf(f);
- // CHECK: cir.func no_inline dso_local @call_expf
- // CHECK: {{.+}} = cir.exp {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_expf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.exp.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_expf(
- // OGCG: call float @llvm.exp.f32(
-}
-
-double call_exp(double f) {
- return exp(f);
- // CHECK: cir.func no_inline dso_local @call_exp
- // CHECK: {{.+}} = cir.exp {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_exp(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.exp.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_exp(
- // OGCG: call double @llvm.exp.f64(
-}
-
-long double call_expl(long double f) {
- return expl(f);
- // CHECK: cir.func no_inline dso_local @call_expl
- // CHECK: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_expl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.exp.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_expl(
- // OGCG: call x86_fp80 @llvm.exp.f80(
-}
-
-// exp2
-
-float my_exp2f(float f) {
- return __builtin_exp2f(f);
- // CHECK: cir.func no_inline dso_local @my_exp2f
- // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_exp2f(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.exp2.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_exp2f(
- // OGCG: call float @llvm.exp2.f32(
-}
-
-double my_exp2(double f) {
- return __builtin_exp2(f);
- // CHECK: cir.func no_inline dso_local @my_exp2
- // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_exp2(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.exp2.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_exp2(
- // OGCG: call double @llvm.exp2.f64(
-}
-
-long double my_exp2l(long double f) {
- return __builtin_exp2l(f);
- // CHECK: cir.func no_inline dso_local @my_exp2l
- // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_exp2l(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.exp2.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_exp2l(
- // OGCG: call x86_fp80 @llvm.exp2.f80(
-}
-
-float exp2f(float);
-double exp2(double);
-long double exp2l(long double);
-
-float call_exp2f(float f) {
- return exp2f(f);
- // CHECK: cir.func no_inline dso_local @call_exp2f
- // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_exp2f(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.exp2.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_exp2f(
- // OGCG: call float @llvm.exp2.f32(
-}
-
-double call_exp2(double f) {
- return exp2(f);
- // CHECK: cir.func no_inline dso_local @call_exp2
- // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_exp2(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.exp2.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_exp2(
- // OGCG: call double @llvm.exp2.f64(
-}
-
-long double call_exp2l(long double f) {
- return exp2l(f);
- // CHECK: cir.func no_inline dso_local @call_exp2l
- // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_exp2l(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.exp2.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_exp2l(
- // OGCG: call x86_fp80 @llvm.exp2.f80(
-}
-
-// floor
-
-float my_floorf(float f) {
- return __builtin_floorf(f);
- // CHECK: cir.func no_inline dso_local @my_floorf
- // CHECK: {{.+}} = cir.floor {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_floorf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.floor.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_floorf(
- // OGCG: call float @llvm.floor.f32(
-}
-
-double my_floor(double f) {
- return __builtin_floor(f);
- // CHECK: cir.func no_inline dso_local @my_floor
- // CHECK: {{.+}} = cir.floor {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_floor(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.floor.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_floor(
- // OGCG: call double @llvm.floor.f64(
-}
-
-long double my_floorl(long double f) {
- return __builtin_floorl(f);
- // CHECK: cir.func no_inline dso_local @my_floorl
- // CHECK: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_floorl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.floor.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_floorl(
- // OGCG: call x86_fp80 @llvm.floor.f80(
-}
-
-float floorf(float);
-double floor(double);
-long double floorl(long double);
-
-float call_floorf(float f) {
- return floorf(f);
- // CHECK: cir.func no_inline dso_local @call_floorf
- // CHECK: {{.+}} = cir.floor {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_floorf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.floor.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_floorf(
- // OGCG: call float @llvm.floor.f32(
-}
-
-double call_floor(double f) {
- return floor(f);
- // CHECK: cir.func no_inline dso_local @call_floor
- // CHECK: {{.+}} = cir.floor {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_floor(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.floor.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_floor(
- // OGCG: call double @llvm.floor.f64(
-}
-
-long double call_floorl(long double f) {
- return floorl(f);
- // CHECK: cir.func no_inline dso_local @call_floorl
- // CHECK: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_floorl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.floor.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_floorl(
- // OGCG: call x86_fp80 @llvm.floor.f80(
-}
-
-// log
-
-float my_logf(float f) {
- return __builtin_logf(f);
- // CHECK: cir.func no_inline dso_local @my_logf
- // CHECK: {{.+}} = cir.log {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_logf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.log.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_logf(
- // OGCG: call float @llvm.log.f32(
-}
-
-double my_log(double f) {
- return __builtin_log(f);
- // CHECK: cir.func no_inline dso_local @my_log
- // CHECK: {{.+}} = cir.log {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_log(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.log.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_log(
- // OGCG: call double @llvm.log.f64(
-}
-
-long double my_logl(long double f) {
- return __builtin_logl(f);
- // CHECK: cir.func no_inline dso_local @my_logl
- // CHECK: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_logl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.log.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_logl(
- // OGCG: call x86_fp80 @llvm.log.f80(
-}
-
-float logf(float);
-double log(double);
-long double logl(long double);
-
-float call_logf(float f) {
- return logf(f);
- // CHECK: cir.func no_inline dso_local @call_logf
- // CHECK: {{.+}} = cir.log {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_logf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.log.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_logf(
- // OGCG: call float @llvm.log.f32(
-}
-
-double call_log(double f) {
- return log(f);
- // CHECK: cir.func no_inline dso_local @call_log
- // CHECK: {{.+}} = cir.log {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_log(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.log.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_log(
- // OGCG: call double @llvm.log.f64(
-}
-
-long double call_logl(long double f) {
- return logl(f);
- // CHECK: cir.func no_inline dso_local @call_logl
- // CHECK: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_logl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.log.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_logl(
- // OGCG: call x86_fp80 @llvm.log.f80(
-}
-
-// log10
-
-float my_log10f(float f) {
- return __builtin_log10f(f);
- // CHECK: cir.func no_inline dso_local @my_log10f
- // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_log10f(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.log10.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_log10f(
- // OGCG: call float @llvm.log10.f32(
-}
-
-double my_log10(double f) {
- return __builtin_log10(f);
- // CHECK: cir.func no_inline dso_local @my_log10
- // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_log10(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.log10.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_log10(
- // OGCG: call double @llvm.log10.f64(
-}
-
-long double my_log10l(long double f) {
- return __builtin_log10l(f);
- // CHECK: cir.func no_inline dso_local @my_log10l
- // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_log10l(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.log10.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_log10l(
- // OGCG: call x86_fp80 @llvm.log10.f80(
-}
-
-float log10f(float);
-double log10(double);
-long double log10l(long double);
-
-float call_log10f(float f) {
- return log10f(f);
- // CHECK: cir.func no_inline dso_local @call_log10f
- // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_log10f(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.log10.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_log10f(
- // OGCG: call float @llvm.log10.f32(
-}
-
-double call_log10(double f) {
- return log10(f);
- // CHECK: cir.func no_inline dso_local @call_log10
- // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_log10(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.log10.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_log10(
- // OGCG: call double @llvm.log10.f64(
-}
-
-long double call_log10l(long double f) {
- return log10l(f);
- // CHECK: cir.func no_inline dso_local @call_log10l
- // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_log10l(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.log10.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_log10l(
- // OGCG: call x86_fp80 @llvm.log10.f80(
-}
-
-// log2
-
-float my_log2f(float f) {
- return __builtin_log2f(f);
- // CHECK: cir.func no_inline dso_local @my_log2f
- // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_log2f(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.log2.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_log2f(
- // OGCG: call float @llvm.log2.f32(
-}
-
-double my_log2(double f) {
- return __builtin_log2(f);
- // CHECK: cir.func no_inline dso_local @my_log2
- // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_log2(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.log2.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_log2(
- // OGCG: call double @llvm.log2.f64(
-}
-
-long double my_log2l(long double f) {
- return __builtin_log2l(f);
- // CHECK: cir.func no_inline dso_local @my_log2l
- // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_log2l(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.log2.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_log2l(
- // OGCG: call x86_fp80 @llvm.log2.f80(
-}
-
-float log2f(float);
-double log2(double);
-long double log2l(long double);
-
-float call_log2f(float f) {
- return log2f(f);
- // CHECK: cir.func no_inline dso_local @call_log2f
- // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_log2f(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.log2.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_log2f(
- // OGCG: call float @llvm.log2.f32(
-}
-
-double call_log2(double f) {
- return log2(f);
- // CHECK: cir.func no_inline dso_local @call_log2
- // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_log2(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.log2.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_log2(
- // OGCG: call double @llvm.log2.f64(
-}
-
-long double call_log2l(long double f) {
- return log2l(f);
- // CHECK: cir.func no_inline dso_local @call_log2l
- // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_log2l(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.log2.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_log2l(
- // OGCG: call x86_fp80 @llvm.log2.f80(
-}
-
-// nearbyint
-
-float my_nearbyintf(float f) {
- return __builtin_nearbyintf(f);
- // CHECK: cir.func no_inline dso_local @my_nearbyintf
- // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_nearbyintf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.nearbyint.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_nearbyintf(
- // OGCG: call float @llvm.nearbyint.f32(
-}
-
-double my_nearbyint(double f) {
- return __builtin_nearbyint(f);
- // CHECK: cir.func no_inline dso_local @my_nearbyint
- // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_nearbyint(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.nearbyint.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_nearbyint(
- // OGCG: call double @llvm.nearbyint.f64(
-}
-
-long double my_nearbyintl(long double f) {
- return __builtin_nearbyintl(f);
- // CHECK: cir.func no_inline dso_local @my_nearbyintl
- // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_nearbyintl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.nearbyint.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_nearbyintl(
- // OGCG: call x86_fp80 @llvm.nearbyint.f80(
-}
-
-float nearbyintf(float);
-double nearbyint(double);
-long double nearbyintl(long double);
-
-float call_nearbyintf(float f) {
- return nearbyintf(f);
- // CHECK: cir.func no_inline dso_local @call_nearbyintf
- // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_nearbyintf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.nearbyint.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_nearbyintf(
- // OGCG: call float @llvm.nearbyint.f32(
-}
-
-double call_nearbyint(double f) {
- return nearbyint(f);
- // CHECK: cir.func no_inline dso_local @call_nearbyint
- // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_nearbyint(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.nearbyint.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_nearbyint(
- // OGCG: call double @llvm.nearbyint.f64(
-}
-
-long double call_nearbyintl(long double f) {
- return nearbyintl(f);
- // CHECK: cir.func no_inline dso_local @call_nearbyintl
- // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_nearbyintl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.nearbyint.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_nearbyintl(
- // OGCG: call x86_fp80 @llvm.nearbyint.f80(
-}
-
-// rint
-
-float my_rintf(float f) {
- return __builtin_rintf(f);
- // CHECK: cir.func no_inline dso_local @my_rintf
- // CHECK: {{.+}} = cir.rint {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_rintf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.rint.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_rintf(
- // OGCG: call float @llvm.rint.f32(
-}
-
-double my_rint(double f) {
- return __builtin_rint(f);
- // CHECK: cir.func no_inline dso_local @my_rint
- // CHECK: {{.+}} = cir.rint {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_rint(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.rint.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_rint(
- // OGCG: call double @llvm.rint.f64(
-}
-
-long double my_rintl(long double f) {
- return __builtin_rintl(f);
- // CHECK: cir.func no_inline dso_local @my_rintl
- // CHECK: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_rintl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.rint.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_rintl(
- // OGCG: call x86_fp80 @llvm.rint.f80(
-}
-
-float rintf(float);
-double rint(double);
-long double rintl(long double);
-
-float call_rintf(float f) {
- return rintf(f);
- // CHECK: cir.func no_inline dso_local @call_rintf
- // CHECK: {{.+}} = cir.rint {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_rintf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.rint.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_rintf(
- // OGCG: call float @llvm.rint.f32(
-}
-
-double call_rint(double f) {
- return rint(f);
- // CHECK: cir.func no_inline dso_local @call_rint
- // CHECK: {{.+}} = cir.rint {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_rint(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.rint.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_rint(
- // OGCG: call double @llvm.rint.f64(
-}
-
-long double call_rintl(long double f) {
- return rintl(f);
- // CHECK: cir.func no_inline dso_local @call_rintl
- // CHECK: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_rintl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.rint.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_rintl(
- // OGCG: call x86_fp80 @llvm.rint.f80(
-}
-
-// round
-
-float my_roundf(float f) {
- return __builtin_roundf(f);
- // CHECK: cir.func no_inline dso_local @my_roundf
- // CHECK: {{.+}} = cir.round {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_roundf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.round.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_roundf(
- // OGCG: call float @llvm.round.f32(
-}
-
-double my_round(double f) {
- return __builtin_round(f);
- // CHECK: cir.func no_inline dso_local @my_round
- // CHECK: {{.+}} = cir.round {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_round(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.round.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_round(
- // OGCG: call double @llvm.round.f64(
-}
-
-long double my_roundl(long double f) {
- return __builtin_roundl(f);
- // CHECK: cir.func no_inline dso_local @my_roundl
- // CHECK: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_roundl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.round.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_roundl(
- // OGCG: call x86_fp80 @llvm.round.f80(
-}
-
-float roundf(float);
-double round(double);
-long double roundl(long double);
-
-float call_roundf(float f) {
- return roundf(f);
- // CHECK: cir.func no_inline dso_local @call_roundf
- // CHECK: {{.+}} = cir.round {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_roundf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.round.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_roundf(
- // OGCG: call float @llvm.round.f32(
-}
-
-double call_round(double f) {
- return round(f);
- // CHECK: cir.func no_inline dso_local @call_round
- // CHECK: {{.+}} = cir.round {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_round(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.round.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_round(
- // OGCG: call double @llvm.round.f64(
-}
-
-long double call_roundl(long double f) {
- return roundl(f);
- // CHECK: cir.func no_inline dso_local @call_roundl
- // CHECK: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_roundl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.round.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_roundl(
- // OGCG: call x86_fp80 @llvm.round.f80(
-}
-
-// sin
-
-float my_sinf(float f) {
- return __builtin_sinf(f);
- // CHECK: cir.func no_inline dso_local @my_sinf
- // CHECK: {{.+}} = cir.sin {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_sinf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.sin.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_sinf(
- // OGCG: call float @llvm.sin.f32(
-}
-
-double my_sin(double f) {
- return __builtin_sin(f);
- // CHECK: cir.func no_inline dso_local @my_sin
- // CHECK: {{.+}} = cir.sin {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_sin(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.sin.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_sin(
- // OGCG: call double @llvm.sin.f64(
-}
-
-long double my_sinl(long double f) {
- return __builtin_sinl(f);
- // CHECK: cir.func no_inline dso_local @my_sinl
- // CHECK: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_sinl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.sin.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_sinl(
- // OGCG: call x86_fp80 @llvm.sin.f80(
-}
-
-float sinf(float);
-double sin(double);
-long double sinl(long double);
-
-float call_sinf(float f) {
- return sinf(f);
- // CHECK: cir.func no_inline dso_local @call_sinf
- // CHECK: {{.+}} = cir.sin {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_sinf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.sin.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_sinf(
- // OGCG: call float @llvm.sin.f32(
-}
-
-double call_sin(double f) {
- return sin(f);
- // CHECK: cir.func no_inline dso_local @call_sin
- // CHECK: {{.+}} = cir.sin {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_sin(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.sin.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_sin(
- // OGCG: call double @llvm.sin.f64(
-}
-
-long double call_sinl(long double f) {
- return sinl(f);
- // CHECK: cir.func no_inline dso_local @call_sinl
- // CHECK: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_sinl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.sin.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_sinl(
- // OGCG: call x86_fp80 @llvm.sin.f80(
-}
-
-// sqrt
-
-float my_sqrtf(float f) {
- return __builtin_sqrtf(f);
- // CHECK: cir.func no_inline dso_local @my_sqrtf
- // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_sqrtf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.sqrt.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_sqrtf(
- // OGCG: call float @llvm.sqrt.f32(
-}
-
-double my_sqrt(double f) {
- return __builtin_sqrt(f);
- // CHECK: cir.func no_inline dso_local @my_sqrt
- // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_sqrt(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.sqrt.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_sqrt(
- // OGCG: call double @llvm.sqrt.f64(
-}
-
-long double my_sqrtl(long double f) {
- return __builtin_sqrtl(f);
- // CHECK: cir.func no_inline dso_local @my_sqrtl
- // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_sqrtl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_sqrtl(
- // OGCG: call x86_fp80 @llvm.sqrt.f80(
-}
-
-float sqrtf(float);
-double sqrt(double);
-long double sqrtl(long double);
-
-float call_sqrtf(float f) {
- return sqrtf(f);
- // CHECK: cir.func no_inline dso_local @call_sqrtf
- // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_sqrtf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.sqrt.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_sqrtf(
- // OGCG: call float @llvm.sqrt.f32(
-}
-
-double call_sqrt(double f) {
- return sqrt(f);
- // CHECK: cir.func no_inline dso_local @call_sqrt
- // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_sqrt(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.sqrt.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_sqrt(
- // OGCG: call double @llvm.sqrt.f64(
-}
-
-long double call_sqrtl(long double f) {
- return sqrtl(f);
- // CHECK: cir.func no_inline dso_local @call_sqrtl
- // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_sqrtl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_sqrtl(
- // OGCG: call x86_fp80 @llvm.sqrt.f80(
-}
-
-// tan
-
-float my_tanf(float f) {
- return __builtin_tanf(f);
- // CHECK: cir.func no_inline dso_local @my_tanf
- // CHECK: {{.+}} = cir.tan {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_tanf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.tan.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_tanf(
- // OGCG: call float @llvm.tan.f32(
-}
-
-double my_tan(double f) {
- return __builtin_tan(f);
- // CHECK: cir.func no_inline dso_local @my_tan
- // CHECK: {{.+}} = cir.tan {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_tan(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.tan.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_tan(
- // OGCG: call double @llvm.tan.f64(
-}
-
-long double my_tanl(long double f) {
- return __builtin_tanl(f);
- // CHECK: cir.func no_inline dso_local @my_tanl
- // CHECK: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_tanl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.tan.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_tanl(
- // OGCG: call x86_fp80 @llvm.tan.f80(
-}
-
-float tanf(float);
-double tan(double);
-long double tanl(long double);
-
-float call_tanf(float f) {
- return tanf(f);
- // CHECK: cir.func no_inline dso_local @call_tanf
- // CHECK: {{.+}} = cir.tan {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_tanf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.tan.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_tanf(
- // OGCG: call float @llvm.tan.f32(
-}
-
-double call_tan(double f) {
- return tan(f);
- // CHECK: cir.func no_inline dso_local @call_tan
- // CHECK: {{.+}} = cir.tan {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_tan(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.tan.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_tan(
- // OGCG: call double @llvm.tan.f64(
-}
-
-long double call_tanl(long double f) {
- return tanl(f);
- // CHECK: cir.func no_inline dso_local @call_tanl
- // CHECK: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_tanl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.tan.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_tanl(
- // OGCG: call x86_fp80 @llvm.tan.f80(
-}
-
-// trunc
-
-float my_truncf(float f) {
- return __builtin_truncf(f);
- // CHECK: cir.func no_inline dso_local @my_truncf
- // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_truncf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.trunc.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_truncf(
- // OGCG: call float @llvm.trunc.f32(
-}
-
-double my_trunc(double f) {
- return __builtin_trunc(f);
- // CHECK: cir.func no_inline dso_local @my_trunc
- // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_trunc(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.trunc.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_trunc(
- // OGCG: call double @llvm.trunc.f64(
-}
-
-long double my_truncl(long double f) {
- return __builtin_truncl(f);
- // CHECK: cir.func no_inline dso_local @my_truncl
- // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_truncl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.trunc.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_truncl(
- // OGCG: call x86_fp80 @llvm.trunc.f80(
-}
-
-float truncf(float);
-double trunc(double);
-long double truncl(long double);
-
-float call_truncf(float f) {
- return truncf(f);
- // CHECK: cir.func no_inline dso_local @call_truncf
- // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_truncf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.trunc.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_truncf(
- // OGCG: call float @llvm.trunc.f32(
-}
-
-double call_trunc(double f) {
- return trunc(f);
- // CHECK: cir.func no_inline dso_local @call_trunc
- // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_trunc(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.trunc.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_trunc(
- // OGCG: call double @llvm.trunc.f64(
-}
-
-long double call_truncl(long double f) {
- return truncl(f);
- // CHECK: cir.func no_inline dso_local @call_truncl
- // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_truncl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.trunc.f80(x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_truncl(
- // OGCG: call x86_fp80 @llvm.trunc.f80(
-}
-
-// copysign
-
-float my_copysignf(float x, float y) {
- return __builtin_copysignf(x, y);
- // CHECK: cir.func no_inline dso_local @my_copysignf
- // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_copysignf
- // LLVM: %{{.+}} = call float @llvm.copysign.f32(float %{{.+}}, float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_copysignf(
- // OGCG: call float @llvm.copysign.f32(
-}
-
-double my_copysign(double x, double y) {
- return __builtin_copysign(x, y);
- // CHECK: cir.func no_inline dso_local @my_copysign
- // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_copysign
- // LLVM: %{{.+}} = call double @llvm.copysign.f64(double %{{.+}}, double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_copysign(
- // OGCG: call double @llvm.copysign.f64(
-}
-
-long double my_copysignl(long double x, long double y) {
- return __builtin_copysignl(x, y);
- // CHECK: cir.func no_inline dso_local @my_copysignl
- // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_copysignl
- // LLVM: %{{.+}} = call x86_fp80 @llvm.copysign.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_copysignl(
- // OGCG: call x86_fp80 @llvm.copysign.f80(
-}
-
-float copysignf(float, float);
-double copysign(double, double);
-long double copysignl(long double, long double);
-
-float call_copysignf(float x, float y) {
- return copysignf(x, y);
- // CHECK: cir.func no_inline dso_local @call_copysignf
- // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_copysignf
- // LLVM: %{{.+}} = call float @llvm.copysign.f32(float %{{.+}}, float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_copysignf(
- // OGCG: call float @llvm.copysign.f32(
-}
-
-double call_copysign(double x, double y) {
- return copysign(x, y);
- // CHECK: cir.func no_inline dso_local @call_copysign
- // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_copysign
- // LLVM: %{{.+}} = call double @llvm.copysign.f64(double %{{.+}}, double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_copysign(
- // OGCG: call double @llvm.copysign.f64(
-}
-
-long double call_copysignl(long double x, long double y) {
- return copysignl(x, y);
- // CHECK: cir.func no_inline dso_local @call_copysignl
- // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_copysignl
- // LLVM: %{{.+}} = call x86_fp80 @llvm.copysign.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_copysignl(
- // OGCG: call x86_fp80 @llvm.copysign.f80(
-}
-
-// fmax
-
-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
-
- // LLVM: define dso_local float @my_fmaxf
- // LLVM: %{{.+}} = call nsz float @llvm.maxnum.f32(float %{{.+}}, float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_fmaxf(
- // OGCG: call nsz float @llvm.maxnum.f32(
-}
-
-double my_fmax(double x, double y) {
- return __builtin_fmax(x, y);
- // CHECK: cir.func no_inline dso_local @my_fmax
- // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_fmax
- // LLVM: %{{.+}} = call nsz double @llvm.maxnum.f64(double %{{.+}}, double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_fmax(
- // OGCG: call nsz double @llvm.maxnum.f64(
-}
-
-long double my_fmaxl(long double x, long double y) {
- return __builtin_fmaxl(x, y);
- // CHECK: cir.func no_inline dso_local @my_fmaxl
- // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_fmaxl
- // LLVM: %{{.+}} = call nsz x86_fp80 @llvm.maxnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_fmaxl(
- // OGCG: call nsz x86_fp80 @llvm.maxnum.f80(
-}
-
-float fmaxf(float, float);
-double fmax(double, double);
-long double fmaxl(long double, long double);
-
-float call_fmaxf(float x, float y) {
- return fmaxf(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmaxf
- // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_fmaxf
- // LLVM: %{{.+}} = call nsz float @llvm.maxnum.f32(float %{{.+}}, float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_fmaxf(
- // OGCG: call nsz float @llvm.maxnum.f32(
-}
-
-double call_fmax(double x, double y) {
- return fmax(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmax
- // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_fmax
- // LLVM: %{{.+}} = call nsz double @llvm.maxnum.f64(double %{{.+}}, double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_fmax(
- // OGCG: call nsz double @llvm.maxnum.f64(
-}
-
-long double call_fmaxl(long double x, long double y) {
- return fmaxl(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmaxl
- // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_fmaxl
- // LLVM: %{{.+}} = call nsz x86_fp80 @llvm.maxnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_fmaxl(
- // OGCG: call nsz x86_fp80 @llvm.maxnum.f80(
-}
-
-// fmin
-
-float my_fminf(float x, float y) {
- return __builtin_fminf(x, y);
- // CHECK: cir.func no_inline dso_local @my_fminf
- // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_fminf
- // LLVM: %{{.+}} = call nsz float @llvm.minnum.f32(float %{{.+}}, float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_fminf(
- // OGCG: call nsz float @llvm.minnum.f32(
-}
-
-double my_fmin(double x, double y) {
- return __builtin_fmin(x, y);
- // CHECK: cir.func no_inline dso_local @my_fmin
- // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_fmin
- // LLVM: %{{.+}} = call nsz double @llvm.minnum.f64(double %{{.+}}, double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_fmin(
- // OGCG: call nsz double @llvm.minnum.f64(
-}
-
-long double my_fminl(long double x, long double y) {
- return __builtin_fminl(x, y);
- // CHECK: cir.func no_inline dso_local @my_fminl
- // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_fminl
- // LLVM: %{{.+}} = call nsz x86_fp80 @llvm.minnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_fminl(
- // OGCG: call nsz x86_fp80 @llvm.minnum.f80(
-}
-
-float fminf(float, float);
-double fmin(double, double);
-long double fminl(long double, long double);
-
-float call_fminf(float x, float y) {
- return fminf(x, y);
- // CHECK: cir.func no_inline dso_local @call_fminf
- // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_fminf
- // LLVM: %{{.+}} = call nsz float @llvm.minnum.f32(float %{{.+}}, float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_fminf(
- // OGCG: call nsz float @llvm.minnum.f32(
-}
-
-double call_fmin(double x, double y) {
- return fmin(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmin
- // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_fmin
- // LLVM: %{{.+}} = call nsz double @llvm.minnum.f64(double %{{.+}}, double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_fmin(
- // OGCG: call nsz double @llvm.minnum.f64(
-}
-
-long double call_fminl(long double x, long double y) {
- return fminl(x, y);
- // CHECK: cir.func no_inline dso_local @call_fminl
- // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_fminl
- // LLVM: %{{.+}} = call nsz x86_fp80 @llvm.minnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_fminl(
- // OGCG: call nsz x86_fp80 @llvm.minnum.f80(
-}
-
-// fmod
-
-float my_fmodf(float x, float y) {
- return __builtin_fmodf(x, y);
- // CHECK: cir.func no_inline dso_local @my_fmodf
- // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_fmodf
- // LLVM: %{{.+}} = frem float %{{.+}}, %{{.+}}
- // LLVM: }
-
- // OGCG: define{{.*}}@my_fmodf(
- // OGCG: frem float
-}
-
-double my_fmod(double x, double y) {
- return __builtin_fmod(x, y);
- // CHECK: cir.func no_inline dso_local @my_fmod
- // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_fmod
- // LLVM: %{{.+}} = frem double %{{.+}}, %{{.+}}
- // LLVM: }
-
- // OGCG: define{{.*}}@my_fmod(
- // OGCG: frem double
-}
-
-long double my_fmodl(long double x, long double y) {
- return __builtin_fmodl(x, y);
- // CHECK: cir.func no_inline dso_local @my_fmodl
- // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_fmodl
- // LLVM: %{{.+}} = frem x86_fp80 %{{.+}}, %{{.+}}
- // LLVM: }
-
- // OGCG: define{{.*}}@my_fmodl(
- // OGCG: frem x86_fp80
-}
-
-float fmodf(float, float);
-double fmod(double, double);
-long double fmodl(long double, long double);
-
-float call_fmodf(float x, float y) {
- return fmodf(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmodf
- // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_fmodf
- // LLVM: %{{.+}} = frem float %{{.+}}, %{{.+}}
- // LLVM: }
-
- // OGCG: define{{.*}}@call_fmodf(
- // OGCG: frem float
-}
-
-double call_fmod(double x, double y) {
- return fmod(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmod
- // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_fmod
- // LLVM: %{{.+}} = frem double %{{.+}}, %{{.+}}
- // LLVM: }
-
- // OGCG: define{{.*}}@call_fmod(
- // OGCG: frem double
-}
-
-long double call_fmodl(long double x, long double y) {
- return fmodl(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmodl
- // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_fmodl
- // LLVM: %{{.+}} = frem x86_fp80 %{{.+}}, %{{.+}}
- // LLVM: }
-
- // OGCG: define{{.*}}@call_fmodl(
- // OGCG: frem x86_fp80
-}
-
-// pow
-
-float my_powf(float x, float y) {
- return __builtin_powf(x, y);
- // CHECK: cir.func no_inline dso_local @my_powf
- // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_powf
- // LLVM: %{{.+}} = call float @llvm.pow.f32(float %{{.+}}, float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_powf(
- // OGCG: call float @llvm.pow.f32(
-}
-
-double my_pow(double x, double y) {
- return __builtin_pow(x, y);
- // CHECK: cir.func no_inline dso_local @my_pow
- // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_pow
- // LLVM: %{{.+}} = call double @llvm.pow.f64(double %{{.+}}, double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_pow(
- // OGCG: call double @llvm.pow.f64(
-}
-
-long double my_powl(long double x, long double y) {
- return __builtin_powl(x, y);
- // CHECK: cir.func no_inline dso_local @my_powl
- // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @my_powl
- // LLVM: %{{.+}} = call x86_fp80 @llvm.pow.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_powl(
- // OGCG: call x86_fp80 @llvm.pow.f80(
-}
-
-float powf(float, float);
-double pow(double, double);
-long double powl(long double, long double);
-
-float call_powf(float x, float y) {
- return powf(x, y);
- // CHECK: cir.func no_inline dso_local @call_powf
- // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @call_powf
- // LLVM: %{{.+}} = call float @llvm.pow.f32(float %{{.+}}, float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_powf(
- // OGCG: call float @llvm.pow.f32(
-}
-
-double call_pow(double x, double y) {
- return pow(x, y);
- // CHECK: cir.func no_inline dso_local @call_pow
- // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @call_pow
- // LLVM: %{{.+}} = call double @llvm.pow.f64(double %{{.+}}, double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_pow(
- // OGCG: call double @llvm.pow.f64(
-}
-
-long double call_powl(long double x, long double y) {
- return powl(x, y);
- // CHECK: cir.func no_inline dso_local @call_powl
- // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
-
- // LLVM: define dso_local x86_fp80 @call_powl
- // LLVM: %{{.+}} = call x86_fp80 @llvm.pow.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@call_powl(
- // OGCG: call x86_fp80 @llvm.pow.f80(
-}
-
-// acos
-
-float my_acosf(float x) {
- return __builtin_acosf(x);
- // CHECK: cir.func no_inline dso_local @my_acosf
- // CHECK: %{{.+}} = cir.acos %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_acosf
- // LLVM: %{{.+}} = call float @llvm.acos.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_acosf(
- // OGCG: call float @llvm.acos.f32(
-}
-
-double my_acos(double x) {
- return __builtin_acos(x);
- // CHECK: cir.func no_inline dso_local @my_acos
- // CHECK: %{{.+}} = cir.acos %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_acos
- // LLVM: %{{.+}} = call double @llvm.acos.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_acos(
- // OGCG: call double @llvm.acos.f64(
-}
-
-// asin
-
-float my_asinf(float x) {
- return __builtin_asinf(x);
- // CHECK: cir.func no_inline dso_local @my_asinf
- // CHECK: %{{.+}} = cir.asin %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_asinf
- // LLVM: %{{.+}} = call float @llvm.asin.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_asinf(
- // OGCG: call float @llvm.asin.f32(
-}
-
-double my_asin(double x) {
- return __builtin_asin(x);
- // CHECK: cir.func no_inline dso_local @my_asin
- // CHECK: %{{.+}} = cir.asin %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_asin
- // LLVM: %{{.+}} = call double @llvm.asin.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_asin(
- // OGCG: call double @llvm.asin.f64(
-}
-
-// atan
-
-float my_atanf(float x) {
- return __builtin_atanf(x);
- // CHECK: cir.func no_inline dso_local @my_atanf
- // CHECK: %{{.+}} = cir.atan %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_atanf
- // LLVM: %{{.+}} = call float @llvm.atan.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_atanf(
- // OGCG: call float @llvm.atan.f32(
-}
-
-double my_atan(double x) {
- return __builtin_atan(x);
- // CHECK: cir.func no_inline dso_local @my_atan
- // CHECK: %{{.+}} = cir.atan %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_atan
- // LLVM: %{{.+}} = call double @llvm.atan.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_atan(
- // OGCG: call double @llvm.atan.f64(
-}
-
-// atan2
-
-float my_atan2f(float y, float x) {
- return __builtin_atan2f(y, x);
- // CHECK: cir.func no_inline dso_local @my_atan2f
- // CHECK: %{{.+}} = cir.atan2 %{{.+}}, %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_atan2f
- // LLVM: %{{.+}} = call float @llvm.atan2.f32(float %{{.+}}, float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_atan2f(
- // OGCG: call float @llvm.atan2.f32(
-}
-
-double my_atan2(double y, double x) {
- return __builtin_atan2(y, x);
- // CHECK: cir.func no_inline dso_local @my_atan2
- // CHECK: %{{.+}} = cir.atan2 %{{.+}}, %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_atan2
- // LLVM: %{{.+}} = call double @llvm.atan2.f64(double %{{.+}}, double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_atan2(
- // OGCG: call double @llvm.atan2.f64(
-}
-
-// roundeven
-
-float my_roundevenf(float x) {
- return __builtin_roundevenf(x);
- // CHECK: cir.func no_inline dso_local @my_roundevenf
- // CHECK: %{{.+}} = cir.roundeven %{{.+}} : !cir.float
-
- // LLVM: define dso_local float @my_roundevenf
- // LLVM: %{{.+}} = call float @llvm.roundeven.f32(float %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_roundevenf(
- // OGCG: call float @llvm.roundeven.f32(
-}
-
-double my_roundeven(double x) {
- return __builtin_roundeven(x);
- // CHECK: cir.func no_inline dso_local @my_roundeven
- // CHECK: %{{.+}} = cir.roundeven %{{.+}} : !cir.double
-
- // LLVM: define dso_local double @my_roundeven
- // LLVM: %{{.+}} = call double @llvm.roundeven.f64(double %{{.+}})
- // LLVM: }
-
- // OGCG: define{{.*}}@my_roundeven(
- // OGCG: call double @llvm.roundeven.f64(
-}
diff --git a/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c b/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
index 010633551f57d..2220630272063 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
@@ -1,90 +1,2212 @@
-// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
-// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
-// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
-// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -Wno-unused-value -emit-llvm %s -o %t.ll
-// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
-
-float cosf(float f) {
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s
+// RUN: %clang_cc1 -triple aarch64-apple-darwin-macho -fclangir -emit-cir %s -o %t-aarch64.cir
+// RUN: FileCheck --input-file=%t-aarch64.cir %s --check-prefix=AARCH64
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm -o %t.ll %s
+// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -o %t-ogcg.ll %s
+// RUN: FileCheck --input-file=%t-ogcg.ll %s --check-prefix=OGCG
+
+// lround
+
+long my_lroundf(float f) {
+ return __builtin_lroundf(f);
+ // CHECK: cir.func no_inline dso_local @my_lroundf
+ // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.float -> !s64i
+
+ // LLVM: define dso_local i64 @my_lroundf
+ // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_lroundf(
+ // OGCG: call i64 @llvm.lround.i64.f32(
+}
+
+long my_lround(double f) {
+ return __builtin_lround(f);
+ // CHECK: cir.func no_inline dso_local @my_lround
+ // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.double -> !s64i
+
+ // LLVM: define dso_local i64 @my_lround
+ // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_lround(
+ // OGCG: call i64 @llvm.lround.i64.f64(
+}
+
+long my_lroundl(long double f) {
+ return __builtin_lroundl(f);
+ // CHECK: cir.func no_inline dso_local @my_lroundl
+ // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: %{{.+}} = cir.lround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+
+ // LLVM: define dso_local i64 @my_lroundl
+ // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_lroundl(
+ // OGCG: call i64 @llvm.lround.i64.f80(
+}
+
+long lroundf(float);
+long lround(double);
+long lroundl(long double);
+
+long call_lroundf(float f) {
+ return lroundf(f);
+ // CHECK: cir.func no_inline dso_local @call_lroundf
+ // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.float -> !s64i
+
+ // LLVM: define dso_local i64 @call_lroundf
+ // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_lroundf(
+ // OGCG: call i64 @llvm.lround.i64.f32(
+}
+
+long call_lround(double f) {
+ return lround(f);
+ // CHECK: cir.func no_inline dso_local @call_lround
+ // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.double -> !s64i
+
+ // LLVM: define dso_local i64 @call_lround
+ // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_lround(
+ // OGCG: call i64 @llvm.lround.i64.f64(
+}
+
+long call_lroundl(long double f) {
+ return lroundl(f);
+ // CHECK: cir.func no_inline dso_local @call_lroundl
+ // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: %{{.+}} = cir.lround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+
+ // LLVM: define dso_local i64 @call_lroundl
+ // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_lroundl(
+ // OGCG: call i64 @llvm.lround.i64.f80(
+}
+
+// llround
+
+long long my_llroundf(float f) {
+ return __builtin_llroundf(f);
+ // CHECK: cir.func no_inline dso_local @my_llroundf
+ // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.float -> !s64i
+
+ // LLVM: define dso_local i64 @my_llroundf
+ // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_llroundf(
+ // OGCG: call i64 @llvm.llround.i64.f32(
+}
+
+long long my_llround(double f) {
+ return __builtin_llround(f);
+ // CHECK: cir.func no_inline dso_local @my_llround
+ // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.double -> !s64i
+
+ // LLVM: define dso_local i64 @my_llround
+ // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_llround(
+ // OGCG: call i64 @llvm.llround.i64.f64(
+}
+
+long long my_llroundl(long double f) {
+ return __builtin_llroundl(f);
+ // CHECK: cir.func no_inline dso_local @my_llroundl
+ // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: %{{.+}} = cir.llround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+
+ // LLVM: define dso_local i64 @my_llroundl
+ // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_llroundl(
+ // OGCG: call i64 @llvm.llround.i64.f80(
+}
+
+long long llroundf(float);
+long long llround(double);
+long long llroundl(long double);
+
+long long call_llroundf(float f) {
+ return llroundf(f);
+ // CHECK: cir.func no_inline dso_local @call_llroundf
+ // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.float -> !s64i
+
+ // LLVM: define dso_local i64 @call_llroundf
+ // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_llroundf(
+ // OGCG: call i64 @llvm.llround.i64.f32(
+}
+
+long long call_llround(double f) {
+ return llround(f);
+ // CHECK: cir.func no_inline dso_local @call_llround
+ // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.double -> !s64i
+
+ // LLVM: define dso_local i64 @call_llround
+ // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_llround(
+ // OGCG: call i64 @llvm.llround.i64.f64(
+}
+
+long long call_llroundl(long double f) {
+ return llroundl(f);
+ // CHECK: cir.func no_inline dso_local @call_llroundl
+ // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: %{{.+}} = cir.llround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+
+ // LLVM: define dso_local i64 @call_llroundl
+ // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_llroundl(
+ // OGCG: call i64 @llvm.llround.i64.f80(
+}
+
+// lrint
+
+long my_lrintf(float f) {
+ return __builtin_lrintf(f);
+ // CHECK: cir.func no_inline dso_local @my_lrintf
+ // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.float -> !s64i
+
+ // LLVM: define dso_local i64 @my_lrintf
+ // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_lrintf(
+ // OGCG: call i64 @llvm.lrint.i64.f32(
+}
+
+long my_lrint(double f) {
+ return __builtin_lrint(f);
+ // CHECK: cir.func no_inline dso_local @my_lrint
+ // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.double -> !s64i
+
+ // LLVM: define dso_local i64 @my_lrint
+ // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_lrint(
+ // OGCG: call i64 @llvm.lrint.i64.f64(
+}
+
+long my_lrintl(long double f) {
+ return __builtin_lrintl(f);
+ // CHECK: cir.func no_inline dso_local @my_lrintl
+ // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+
+ // LLVM: define dso_local i64 @my_lrintl
+ // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_lrintl(
+ // OGCG: call i64 @llvm.lrint.i64.f80(
+}
+
+long lrintf(float);
+long lrint(double);
+long lrintl(long double);
+
+long call_lrintf(float f) {
+ return lrintf(f);
+ // CHECK: cir.func no_inline dso_local @call_lrintf
+ // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.float -> !s64i
+
+ // LLVM: define dso_local i64 @call_lrintf
+ // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_lrintf(
+ // OGCG: call i64 @llvm.lrint.i64.f32(
+}
+
+long call_lrint(double f) {
+ return lrint(f);
+ // CHECK: cir.func no_inline dso_local @call_lrint
+ // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.double -> !s64i
+
+ // LLVM: define dso_local i64 @call_lrint
+ // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_lrint(
+ // OGCG: call i64 @llvm.lrint.i64.f64(
+}
+
+long call_lrintl(long double f) {
+ return lrintl(f);
+ // CHECK: cir.func no_inline dso_local @call_lrintl
+ // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+
+ // LLVM: define dso_local i64 @call_lrintl
+ // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_lrintl(
+ // OGCG: call i64 @llvm.lrint.i64.f80(
+}
+
+// llrint
+
+long long my_llrintf(float f) {
+ return __builtin_llrintf(f);
+ // CHECK: cir.func no_inline dso_local @my_llrintf
+ // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.float -> !s64i
+
+ // LLVM: define dso_local i64 @my_llrintf
+ // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_llrintf(
+ // OGCG: call i64 @llvm.llrint.i64.f32(
+}
+
+long long my_llrint(double f) {
+ return __builtin_llrint(f);
+ // CHECK: cir.func no_inline dso_local @my_llrint
+ // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.double -> !s64i
+
+ // LLVM: define dso_local i64 @my_llrint
+ // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_llrint(
+ // OGCG: call i64 @llvm.llrint.i64.f64(
+}
+
+long long my_llrintl(long double f) {
+ return __builtin_llrintl(f);
+ // CHECK: cir.func no_inline dso_local @my_llrintl
+ // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+
+ // LLVM: define dso_local i64 @my_llrintl
+ // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_llrintl(
+ // OGCG: call i64 @llvm.llrint.i64.f80(
+}
+
+long long llrintf(float);
+long long llrint(double);
+long long llrintl(long double);
+
+long long call_llrintf(float f) {
+ return llrintf(f);
+ // CHECK: cir.func no_inline dso_local @call_llrintf
+ // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.float -> !s64i
+
+ // LLVM: define dso_local i64 @call_llrintf
+ // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_llrintf(
+ // OGCG: call i64 @llvm.llrint.i64.f32(
+}
+
+long long call_llrint(double f) {
+ return llrint(f);
+ // CHECK: cir.func no_inline dso_local @call_llrint
+ // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.double -> !s64i
+
+ // LLVM: define dso_local i64 @call_llrint
+ // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_llrint(
+ // OGCG: call i64 @llvm.llrint.i64.f64(
+}
+
+long long call_llrintl(long double f) {
+ return llrintl(f);
+ // CHECK: cir.func no_inline dso_local @call_llrintl
+ // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+
+ // LLVM: define dso_local i64 @call_llrintl
+ // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_llrintl(
+ // OGCG: call i64 @llvm.llrint.i64.f80(
+}
+
+// ceil
+
+float my_ceilf(float f) {
+ return __builtin_ceilf(f);
+ // CHECK: cir.func no_inline dso_local @my_ceilf
+ // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_ceilf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.ceil.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_ceilf(
+ // OGCG: call float @llvm.ceil.f32(
+}
+
+double my_ceil(double f) {
+ return __builtin_ceil(f);
+ // CHECK: cir.func no_inline dso_local @my_ceil
+ // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_ceil(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.ceil.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_ceil(
+ // OGCG: call double @llvm.ceil.f64(
+}
+
+long double my_ceill(long double f) {
+ return __builtin_ceill(f);
+ // CHECK: cir.func no_inline dso_local @my_ceill
+ // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_ceill(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.ceil.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_ceill(
+ // OGCG: call x86_fp80 @llvm.ceil.f80(
+}
+
+float ceilf(float);
+double ceil(double);
+long double ceill(long double);
+
+float call_ceilf(float f) {
+ return ceilf(f);
+ // CHECK: cir.func no_inline dso_local @call_ceilf
+ // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_ceilf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.ceil.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_ceilf(
+ // OGCG: call float @llvm.ceil.f32(
+}
+
+double call_ceil(double f) {
+ return ceil(f);
+ // CHECK: cir.func no_inline dso_local @call_ceil
+ // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_ceil(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.ceil.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_ceil(
+ // OGCG: call double @llvm.ceil.f64(
+}
+
+long double call_ceill(long double f) {
+ return ceill(f);
+ // CHECK: cir.func no_inline dso_local @call_ceill
+ // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_ceill(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.ceil.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_ceill(
+ // OGCG: call x86_fp80 @llvm.ceil.f80(
+}
+
+// cos
+
+float my_cosf(float f) {
return __builtin_cosf(f);
- // CIR: %{{.*}} = cir.cos %{{.*}} : !cir.float
- // LLVM: %{{.*}} = call float @llvm.cos.f32(float %{{.*}})
- // OGCG: %{{.*}} = call float @llvm.cos.f32(float %{{.*}})
+ // CHECK: cir.func no_inline dso_local @my_cosf
+ // CHECK: {{.+}} = cir.cos {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_cosf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.cos.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_cosf(
+ // OGCG: call float @llvm.cos.f32(
}
-double cos(double f) {
+double my_cos(double f) {
return __builtin_cos(f);
- // CIR: %{{.*}} = cir.cos %{{.*}} : !cir.double
- // LLVM: %{{.*}} = call double @llvm.cos.f64(double %{{.*}})
- // OGCG: %{{.*}} = call double @llvm.cos.f64(double %{{.*}})
+ // CHECK: cir.func no_inline dso_local @my_cos
+ // CHECK: {{.+}} = cir.cos {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_cos(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.cos.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_cos(
+ // OGCG: call double @llvm.cos.f64(
}
-float ceil(float f) {
- return __builtin_ceilf(f);
- // CIR: %{{.*}} = cir.ceil %{{.*}} : !cir.float
- // LLVM: %{{.*}} = call float @llvm.ceil.f32(float %{{.*}})
- // OGCG: %{{.*}} = call float @llvm.ceil.f32(float %{{.*}})
+long double my_cosl(long double f) {
+ return __builtin_cosl(f);
+ // CHECK: cir.func no_inline dso_local @my_cosl
+ // CHECK: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_cosl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.cos.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_cosl(
+ // OGCG: call x86_fp80 @llvm.cos.f80(
+}
+
+float cosf(float);
+double cos(double);
+long double cosl(long double);
+
+float call_cosf(float f) {
+ return cosf(f);
+ // CHECK: cir.func no_inline dso_local @call_cosf
+ // CHECK: {{.+}} = cir.cos {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_cosf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.cos.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_cosf(
+ // OGCG: call float @llvm.cos.f32(
+}
+
+double call_cos(double f) {
+ return cos(f);
+ // CHECK: cir.func no_inline dso_local @call_cos
+ // CHECK: {{.+}} = cir.cos {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_cos(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.cos.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_cos(
+ // OGCG: call double @llvm.cos.f64(
+}
+
+long double call_cosl(long double f) {
+ return cosl(f);
+ // CHECK: cir.func no_inline dso_local @call_cosl
+ // CHECK: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_cosl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.cos.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_cosl(
+ // OGCG: call x86_fp80 @llvm.cos.f80(
}
-float expf(float f) {
+// exp
+
+float my_expf(float f) {
return __builtin_expf(f);
- // CIR: %{{.*}} = cir.exp {{.*}} : !cir.float
- // LLVM: %{{.*}} = call float @llvm.exp.f32(float %{{.*}})
- // OGCG: %{{.*}} = call float @llvm.exp.f32(float %{{.*}})
+ // CHECK: cir.func no_inline dso_local @my_expf
+ // CHECK: {{.+}} = cir.exp {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_expf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.exp.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_expf(
+ // OGCG: call float @llvm.exp.f32(
}
-double exp(double f) {
+double my_exp(double f) {
return __builtin_exp(f);
- // CIR: %{{.*}} = cir.exp {{.*}} : !cir.double
- // LLVM: %{{.*}} = call double @llvm.exp.f64(double %{{.*}})
- // OGCG: %{{.*}} = call double @llvm.exp.f64(double %{{.*}})
+ // CHECK: cir.func no_inline dso_local @my_exp
+ // CHECK: {{.+}} = cir.exp {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_exp(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.exp.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_exp(
+ // OGCG: call double @llvm.exp.f64(
}
-long double expl(long double f) {
+long double my_expl(long double f) {
return __builtin_expl(f);
- // CIR: %{{.*}} = cir.exp {{.*}} : !cir.long_double<!cir.f128>
- // LLVM: %{{.*}} = call fp128 @llvm.exp.f128(fp128 %{{.*}})
- // OGCG: %{{.*}} = call fp128 @llvm.exp.f128(fp128 %{{.*}})
+ // CHECK: cir.func no_inline dso_local @my_expl
+ // CHECK: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_expl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.exp.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_expl(
+ // OGCG: call x86_fp80 @llvm.exp.f80(
}
-float exp2f(float f) {
+float expf(float);
+double exp(double);
+long double expl(long double);
+
+float call_expf(float f) {
+ return expf(f);
+ // CHECK: cir.func no_inline dso_local @call_expf
+ // CHECK: {{.+}} = cir.exp {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_expf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.exp.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_expf(
+ // OGCG: call float @llvm.exp.f32(
+}
+
+double call_exp(double f) {
+ return exp(f);
+ // CHECK: cir.func no_inline dso_local @call_exp
+ // CHECK: {{.+}} = cir.exp {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_exp(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.exp.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_exp(
+ // OGCG: call double @llvm.exp.f64(
+}
+
+long double call_expl(long double f) {
+ return expl(f);
+ // CHECK: cir.func no_inline dso_local @call_expl
+ // CHECK: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_expl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.exp.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_expl(
+ // OGCG: call x86_fp80 @llvm.exp.f80(
+}
+
+// exp2
+
+float my_exp2f(float f) {
return __builtin_exp2f(f);
- // CIR: %{{.*}} = cir.exp2 {{.*}} : !cir.float
- // LLVM: %{{.*}} = call float @llvm.exp2.f32(float %{{.*}})
- // OGCG: %{{.*}} = call float @llvm.exp2.f32(float %{{.*}})
+ // CHECK: cir.func no_inline dso_local @my_exp2f
+ // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_exp2f(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.exp2.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_exp2f(
+ // OGCG: call float @llvm.exp2.f32(
}
double my_exp2(double f) {
return __builtin_exp2(f);
- // CIR: %{{.*}} = cir.exp2 {{.*}} : !cir.double
- // LLVM: %{{.*}} = call double @llvm.exp2.f64(double %{{.*}})
- // OGCG: %{{.*}} = call double @llvm.exp2.f64(double %{{.*}})
+ // CHECK: cir.func no_inline dso_local @my_exp2
+ // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_exp2(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.exp2.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_exp2(
+ // OGCG: call double @llvm.exp2.f64(
}
long double my_exp2l(long double f) {
return __builtin_exp2l(f);
- // CIR: %{{.*}} = cir.exp2 {{.*}} : !cir.long_double<!cir.f128>
- // LLVM: %{{.*}} = call fp128 @llvm.exp2.f128(fp128 %{{.*}})
- // OGCG: %{{.*}} = call fp128 @llvm.exp2.f128(fp128 %{{.*}})
+ // CHECK: cir.func no_inline dso_local @my_exp2l
+ // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_exp2l(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.exp2.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_exp2l(
+ // OGCG: call x86_fp80 @llvm.exp2.f80(
+}
+
+float exp2f(float);
+double exp2(double);
+long double exp2l(long double);
+
+float call_exp2f(float f) {
+ return exp2f(f);
+ // CHECK: cir.func no_inline dso_local @call_exp2f
+ // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_exp2f(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.exp2.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_exp2f(
+ // OGCG: call float @llvm.exp2.f32(
+}
+
+double call_exp2(double f) {
+ return exp2(f);
+ // CHECK: cir.func no_inline dso_local @call_exp2
+ // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_exp2(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.exp2.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_exp2(
+ // OGCG: call double @llvm.exp2.f64(
+}
+
+long double call_exp2l(long double f) {
+ return exp2l(f);
+ // CHECK: cir.func no_inline dso_local @call_exp2l
+ // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_exp2l(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.exp2.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_exp2l(
+ // OGCG: call x86_fp80 @llvm.exp2.f80(
}
-float floorf(float f) {
+// floor
+
+float my_floorf(float f) {
return __builtin_floorf(f);
- // CIR: %{{.*}} = cir.floor %{{.*}} : !cir.float
- // LLVM: %{{.*}} = call float @llvm.floor.f32(float %{{.*}})
- // OGCG: %{{.*}} = call float @llvm.floor.f32(float %{{.*}})
+ // CHECK: cir.func no_inline dso_local @my_floorf
+ // CHECK: {{.+}} = cir.floor {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_floorf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.floor.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_floorf(
+ // OGCG: call float @llvm.floor.f32(
}
-double floor(double f) {
+double my_floor(double f) {
return __builtin_floor(f);
- // CIR: %{{.*}} = cir.floor %{{.*}} : !cir.double
- // LLVM: %{{.*}} = call double @llvm.floor.f64(double %{{.*}})
- // OGCG: %{{.*}} = call double @llvm.floor.f64(double %{{.*}})
+ // CHECK: cir.func no_inline dso_local @my_floor
+ // CHECK: {{.+}} = cir.floor {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_floor(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.floor.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_floor(
+ // OGCG: call double @llvm.floor.f64(
}
-long double floorl(long double f) {
+long double my_floorl(long double f) {
return __builtin_floorl(f);
- // CIR: %{{.*}} = cir.floor %{{.*}} : !cir.long_double<!cir.f128>
- // LLVM: %{{.*}} = call fp128 @llvm.floor.f128(fp128 %{{.*}})
- // OGCG: %{{.*}} = call fp128 @llvm.floor.f128(fp128 %{{.*}})
+ // CHECK: cir.func no_inline dso_local @my_floorl
+ // CHECK: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_floorl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.floor.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_floorl(
+ // OGCG: call x86_fp80 @llvm.floor.f80(
+}
+
+float floorf(float);
+double floor(double);
+long double floorl(long double);
+
+float call_floorf(float f) {
+ return floorf(f);
+ // CHECK: cir.func no_inline dso_local @call_floorf
+ // CHECK: {{.+}} = cir.floor {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_floorf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.floor.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_floorf(
+ // OGCG: call float @llvm.floor.f32(
+}
+
+double call_floor(double f) {
+ return floor(f);
+ // CHECK: cir.func no_inline dso_local @call_floor
+ // CHECK: {{.+}} = cir.floor {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_floor(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.floor.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_floor(
+ // OGCG: call double @llvm.floor.f64(
+}
+
+long double call_floorl(long double f) {
+ return floorl(f);
+ // CHECK: cir.func no_inline dso_local @call_floorl
+ // CHECK: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_floorl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.floor.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_floorl(
+ // OGCG: call x86_fp80 @llvm.floor.f80(
+}
+
+// log
+
+float my_logf(float f) {
+ return __builtin_logf(f);
+ // CHECK: cir.func no_inline dso_local @my_logf
+ // CHECK: {{.+}} = cir.log {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_logf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.log.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_logf(
+ // OGCG: call float @llvm.log.f32(
+}
+
+double my_log(double f) {
+ return __builtin_log(f);
+ // CHECK: cir.func no_inline dso_local @my_log
+ // CHECK: {{.+}} = cir.log {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_log(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.log.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_log(
+ // OGCG: call double @llvm.log.f64(
+}
+
+long double my_logl(long double f) {
+ return __builtin_logl(f);
+ // CHECK: cir.func no_inline dso_local @my_logl
+ // CHECK: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_logl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.log.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_logl(
+ // OGCG: call x86_fp80 @llvm.log.f80(
+}
+
+float logf(float);
+double log(double);
+long double logl(long double);
+
+float call_logf(float f) {
+ return logf(f);
+ // CHECK: cir.func no_inline dso_local @call_logf
+ // CHECK: {{.+}} = cir.log {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_logf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.log.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_logf(
+ // OGCG: call float @llvm.log.f32(
+}
+
+double call_log(double f) {
+ return log(f);
+ // CHECK: cir.func no_inline dso_local @call_log
+ // CHECK: {{.+}} = cir.log {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_log(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.log.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_log(
+ // OGCG: call double @llvm.log.f64(
+}
+
+long double call_logl(long double f) {
+ return logl(f);
+ // CHECK: cir.func no_inline dso_local @call_logl
+ // CHECK: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_logl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.log.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_logl(
+ // OGCG: call x86_fp80 @llvm.log.f80(
+}
+
+// log10
+
+float my_log10f(float f) {
+ return __builtin_log10f(f);
+ // CHECK: cir.func no_inline dso_local @my_log10f
+ // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_log10f(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.log10.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_log10f(
+ // OGCG: call float @llvm.log10.f32(
+}
+
+double my_log10(double f) {
+ return __builtin_log10(f);
+ // CHECK: cir.func no_inline dso_local @my_log10
+ // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_log10(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.log10.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_log10(
+ // OGCG: call double @llvm.log10.f64(
+}
+
+long double my_log10l(long double f) {
+ return __builtin_log10l(f);
+ // CHECK: cir.func no_inline dso_local @my_log10l
+ // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_log10l(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.log10.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_log10l(
+ // OGCG: call x86_fp80 @llvm.log10.f80(
+}
+
+float log10f(float);
+double log10(double);
+long double log10l(long double);
+
+float call_log10f(float f) {
+ return log10f(f);
+ // CHECK: cir.func no_inline dso_local @call_log10f
+ // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_log10f(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.log10.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_log10f(
+ // OGCG: call float @llvm.log10.f32(
+}
+
+double call_log10(double f) {
+ return log10(f);
+ // CHECK: cir.func no_inline dso_local @call_log10
+ // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_log10(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.log10.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_log10(
+ // OGCG: call double @llvm.log10.f64(
+}
+
+long double call_log10l(long double f) {
+ return log10l(f);
+ // CHECK: cir.func no_inline dso_local @call_log10l
+ // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_log10l(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.log10.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_log10l(
+ // OGCG: call x86_fp80 @llvm.log10.f80(
+}
+
+// log2
+
+float my_log2f(float f) {
+ return __builtin_log2f(f);
+ // CHECK: cir.func no_inline dso_local @my_log2f
+ // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_log2f(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.log2.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_log2f(
+ // OGCG: call float @llvm.log2.f32(
+}
+
+double my_log2(double f) {
+ return __builtin_log2(f);
+ // CHECK: cir.func no_inline dso_local @my_log2
+ // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_log2(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.log2.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_log2(
+ // OGCG: call double @llvm.log2.f64(
+}
+
+long double my_log2l(long double f) {
+ return __builtin_log2l(f);
+ // CHECK: cir.func no_inline dso_local @my_log2l
+ // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_log2l(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.log2.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_log2l(
+ // OGCG: call x86_fp80 @llvm.log2.f80(
+}
+
+float log2f(float);
+double log2(double);
+long double log2l(long double);
+
+float call_log2f(float f) {
+ return log2f(f);
+ // CHECK: cir.func no_inline dso_local @call_log2f
+ // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_log2f(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.log2.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_log2f(
+ // OGCG: call float @llvm.log2.f32(
+}
+
+double call_log2(double f) {
+ return log2(f);
+ // CHECK: cir.func no_inline dso_local @call_log2
+ // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_log2(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.log2.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_log2(
+ // OGCG: call double @llvm.log2.f64(
+}
+
+long double call_log2l(long double f) {
+ return log2l(f);
+ // CHECK: cir.func no_inline dso_local @call_log2l
+ // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_log2l(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.log2.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_log2l(
+ // OGCG: call x86_fp80 @llvm.log2.f80(
+}
+
+// nearbyint
+
+float my_nearbyintf(float f) {
+ return __builtin_nearbyintf(f);
+ // CHECK: cir.func no_inline dso_local @my_nearbyintf
+ // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_nearbyintf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.nearbyint.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_nearbyintf(
+ // OGCG: call float @llvm.nearbyint.f32(
+}
+
+double my_nearbyint(double f) {
+ return __builtin_nearbyint(f);
+ // CHECK: cir.func no_inline dso_local @my_nearbyint
+ // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_nearbyint(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.nearbyint.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_nearbyint(
+ // OGCG: call double @llvm.nearbyint.f64(
+}
+
+long double my_nearbyintl(long double f) {
+ return __builtin_nearbyintl(f);
+ // CHECK: cir.func no_inline dso_local @my_nearbyintl
+ // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_nearbyintl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.nearbyint.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_nearbyintl(
+ // OGCG: call x86_fp80 @llvm.nearbyint.f80(
+}
+
+float nearbyintf(float);
+double nearbyint(double);
+long double nearbyintl(long double);
+
+float call_nearbyintf(float f) {
+ return nearbyintf(f);
+ // CHECK: cir.func no_inline dso_local @call_nearbyintf
+ // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_nearbyintf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.nearbyint.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_nearbyintf(
+ // OGCG: call float @llvm.nearbyint.f32(
+}
+
+double call_nearbyint(double f) {
+ return nearbyint(f);
+ // CHECK: cir.func no_inline dso_local @call_nearbyint
+ // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_nearbyint(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.nearbyint.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_nearbyint(
+ // OGCG: call double @llvm.nearbyint.f64(
+}
+
+long double call_nearbyintl(long double f) {
+ return nearbyintl(f);
+ // CHECK: cir.func no_inline dso_local @call_nearbyintl
+ // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_nearbyintl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.nearbyint.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_nearbyintl(
+ // OGCG: call x86_fp80 @llvm.nearbyint.f80(
+}
+
+// rint
+
+float my_rintf(float f) {
+ return __builtin_rintf(f);
+ // CHECK: cir.func no_inline dso_local @my_rintf
+ // CHECK: {{.+}} = cir.rint {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_rintf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.rint.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_rintf(
+ // OGCG: call float @llvm.rint.f32(
+}
+
+double my_rint(double f) {
+ return __builtin_rint(f);
+ // CHECK: cir.func no_inline dso_local @my_rint
+ // CHECK: {{.+}} = cir.rint {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_rint(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.rint.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_rint(
+ // OGCG: call double @llvm.rint.f64(
+}
+
+long double my_rintl(long double f) {
+ return __builtin_rintl(f);
+ // CHECK: cir.func no_inline dso_local @my_rintl
+ // CHECK: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_rintl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.rint.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_rintl(
+ // OGCG: call x86_fp80 @llvm.rint.f80(
+}
+
+float rintf(float);
+double rint(double);
+long double rintl(long double);
+
+float call_rintf(float f) {
+ return rintf(f);
+ // CHECK: cir.func no_inline dso_local @call_rintf
+ // CHECK: {{.+}} = cir.rint {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_rintf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.rint.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_rintf(
+ // OGCG: call float @llvm.rint.f32(
+}
+
+double call_rint(double f) {
+ return rint(f);
+ // CHECK: cir.func no_inline dso_local @call_rint
+ // CHECK: {{.+}} = cir.rint {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_rint(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.rint.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_rint(
+ // OGCG: call double @llvm.rint.f64(
+}
+
+long double call_rintl(long double f) {
+ return rintl(f);
+ // CHECK: cir.func no_inline dso_local @call_rintl
+ // CHECK: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_rintl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.rint.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_rintl(
+ // OGCG: call x86_fp80 @llvm.rint.f80(
+}
+
+// round
+
+float my_roundf(float f) {
+ return __builtin_roundf(f);
+ // CHECK: cir.func no_inline dso_local @my_roundf
+ // CHECK: {{.+}} = cir.round {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_roundf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.round.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_roundf(
+ // OGCG: call float @llvm.round.f32(
+}
+
+double my_round(double f) {
+ return __builtin_round(f);
+ // CHECK: cir.func no_inline dso_local @my_round
+ // CHECK: {{.+}} = cir.round {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_round(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.round.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_round(
+ // OGCG: call double @llvm.round.f64(
+}
+
+long double my_roundl(long double f) {
+ return __builtin_roundl(f);
+ // CHECK: cir.func no_inline dso_local @my_roundl
+ // CHECK: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_roundl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.round.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_roundl(
+ // OGCG: call x86_fp80 @llvm.round.f80(
+}
+
+float roundf(float);
+double round(double);
+long double roundl(long double);
+
+float call_roundf(float f) {
+ return roundf(f);
+ // CHECK: cir.func no_inline dso_local @call_roundf
+ // CHECK: {{.+}} = cir.round {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_roundf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.round.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_roundf(
+ // OGCG: call float @llvm.round.f32(
+}
+
+double call_round(double f) {
+ return round(f);
+ // CHECK: cir.func no_inline dso_local @call_round
+ // CHECK: {{.+}} = cir.round {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_round(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.round.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_round(
+ // OGCG: call double @llvm.round.f64(
+}
+
+long double call_roundl(long double f) {
+ return roundl(f);
+ // CHECK: cir.func no_inline dso_local @call_roundl
+ // CHECK: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_roundl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.round.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_roundl(
+ // OGCG: call x86_fp80 @llvm.round.f80(
+}
+
+// sin
+
+float my_sinf(float f) {
+ return __builtin_sinf(f);
+ // CHECK: cir.func no_inline dso_local @my_sinf
+ // CHECK: {{.+}} = cir.sin {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_sinf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.sin.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_sinf(
+ // OGCG: call float @llvm.sin.f32(
+}
+
+double my_sin(double f) {
+ return __builtin_sin(f);
+ // CHECK: cir.func no_inline dso_local @my_sin
+ // CHECK: {{.+}} = cir.sin {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_sin(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.sin.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_sin(
+ // OGCG: call double @llvm.sin.f64(
+}
+
+long double my_sinl(long double f) {
+ return __builtin_sinl(f);
+ // CHECK: cir.func no_inline dso_local @my_sinl
+ // CHECK: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_sinl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.sin.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_sinl(
+ // OGCG: call x86_fp80 @llvm.sin.f80(
+}
+
+float sinf(float);
+double sin(double);
+long double sinl(long double);
+
+float call_sinf(float f) {
+ return sinf(f);
+ // CHECK: cir.func no_inline dso_local @call_sinf
+ // CHECK: {{.+}} = cir.sin {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_sinf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.sin.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_sinf(
+ // OGCG: call float @llvm.sin.f32(
+}
+
+double call_sin(double f) {
+ return sin(f);
+ // CHECK: cir.func no_inline dso_local @call_sin
+ // CHECK: {{.+}} = cir.sin {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_sin(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.sin.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_sin(
+ // OGCG: call double @llvm.sin.f64(
+}
+
+long double call_sinl(long double f) {
+ return sinl(f);
+ // CHECK: cir.func no_inline dso_local @call_sinl
+ // CHECK: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_sinl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.sin.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_sinl(
+ // OGCG: call x86_fp80 @llvm.sin.f80(
+}
+
+// sqrt
+
+float my_sqrtf(float f) {
+ return __builtin_sqrtf(f);
+ // CHECK: cir.func no_inline dso_local @my_sqrtf
+ // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_sqrtf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.sqrt.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_sqrtf(
+ // OGCG: call float @llvm.sqrt.f32(
+}
+
+double my_sqrt(double f) {
+ return __builtin_sqrt(f);
+ // CHECK: cir.func no_inline dso_local @my_sqrt
+ // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_sqrt(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.sqrt.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_sqrt(
+ // OGCG: call double @llvm.sqrt.f64(
+}
+
+long double my_sqrtl(long double f) {
+ return __builtin_sqrtl(f);
+ // CHECK: cir.func no_inline dso_local @my_sqrtl
+ // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_sqrtl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_sqrtl(
+ // OGCG: call x86_fp80 @llvm.sqrt.f80(
+}
+
+float sqrtf(float);
+double sqrt(double);
+long double sqrtl(long double);
+
+float call_sqrtf(float f) {
+ return sqrtf(f);
+ // CHECK: cir.func no_inline dso_local @call_sqrtf
+ // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_sqrtf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.sqrt.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_sqrtf(
+ // OGCG: call float @llvm.sqrt.f32(
+}
+
+double call_sqrt(double f) {
+ return sqrt(f);
+ // CHECK: cir.func no_inline dso_local @call_sqrt
+ // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_sqrt(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.sqrt.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_sqrt(
+ // OGCG: call double @llvm.sqrt.f64(
+}
+
+long double call_sqrtl(long double f) {
+ return sqrtl(f);
+ // CHECK: cir.func no_inline dso_local @call_sqrtl
+ // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_sqrtl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_sqrtl(
+ // OGCG: call x86_fp80 @llvm.sqrt.f80(
+}
+
+// tan
+
+float my_tanf(float f) {
+ return __builtin_tanf(f);
+ // CHECK: cir.func no_inline dso_local @my_tanf
+ // CHECK: {{.+}} = cir.tan {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_tanf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.tan.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_tanf(
+ // OGCG: call float @llvm.tan.f32(
+}
+
+double my_tan(double f) {
+ return __builtin_tan(f);
+ // CHECK: cir.func no_inline dso_local @my_tan
+ // CHECK: {{.+}} = cir.tan {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_tan(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.tan.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_tan(
+ // OGCG: call double @llvm.tan.f64(
+}
+
+long double my_tanl(long double f) {
+ return __builtin_tanl(f);
+ // CHECK: cir.func no_inline dso_local @my_tanl
+ // CHECK: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_tanl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.tan.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_tanl(
+ // OGCG: call x86_fp80 @llvm.tan.f80(
+}
+
+float tanf(float);
+double tan(double);
+long double tanl(long double);
+
+float call_tanf(float f) {
+ return tanf(f);
+ // CHECK: cir.func no_inline dso_local @call_tanf
+ // CHECK: {{.+}} = cir.tan {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_tanf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.tan.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_tanf(
+ // OGCG: call float @llvm.tan.f32(
+}
+
+double call_tan(double f) {
+ return tan(f);
+ // CHECK: cir.func no_inline dso_local @call_tan
+ // CHECK: {{.+}} = cir.tan {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_tan(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.tan.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_tan(
+ // OGCG: call double @llvm.tan.f64(
+}
+
+long double call_tanl(long double f) {
+ return tanl(f);
+ // CHECK: cir.func no_inline dso_local @call_tanl
+ // CHECK: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_tanl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.tan.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_tanl(
+ // OGCG: call x86_fp80 @llvm.tan.f80(
+}
+
+// trunc
+
+float my_truncf(float f) {
+ return __builtin_truncf(f);
+ // CHECK: cir.func no_inline dso_local @my_truncf
+ // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_truncf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.trunc.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_truncf(
+ // OGCG: call float @llvm.trunc.f32(
+}
+
+double my_trunc(double f) {
+ return __builtin_trunc(f);
+ // CHECK: cir.func no_inline dso_local @my_trunc
+ // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_trunc(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.trunc.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_trunc(
+ // OGCG: call double @llvm.trunc.f64(
+}
+
+long double my_truncl(long double f) {
+ return __builtin_truncl(f);
+ // CHECK: cir.func no_inline dso_local @my_truncl
+ // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_truncl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.trunc.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_truncl(
+ // OGCG: call x86_fp80 @llvm.trunc.f80(
+}
+
+float truncf(float);
+double trunc(double);
+long double truncl(long double);
+
+float call_truncf(float f) {
+ return truncf(f);
+ // CHECK: cir.func no_inline dso_local @call_truncf
+ // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_truncf(float noundef %0)
+ // LLVM: %{{.+}} = call float @llvm.trunc.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_truncf(
+ // OGCG: call float @llvm.trunc.f32(
+}
+
+double call_trunc(double f) {
+ return trunc(f);
+ // CHECK: cir.func no_inline dso_local @call_trunc
+ // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_trunc(double noundef %0)
+ // LLVM: %{{.+}} = call double @llvm.trunc.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_trunc(
+ // OGCG: call double @llvm.trunc.f64(
+}
+
+long double call_truncl(long double f) {
+ return truncl(f);
+ // CHECK: cir.func no_inline dso_local @call_truncl
+ // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_truncl(x86_fp80 noundef %0)
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.trunc.f80(x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_truncl(
+ // OGCG: call x86_fp80 @llvm.trunc.f80(
+}
+
+// copysign
+
+float my_copysignf(float x, float y) {
+ return __builtin_copysignf(x, y);
+ // CHECK: cir.func no_inline dso_local @my_copysignf
+ // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_copysignf
+ // LLVM: %{{.+}} = call float @llvm.copysign.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_copysignf(
+ // OGCG: call float @llvm.copysign.f32(
+}
+
+double my_copysign(double x, double y) {
+ return __builtin_copysign(x, y);
+ // CHECK: cir.func no_inline dso_local @my_copysign
+ // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_copysign
+ // LLVM: %{{.+}} = call double @llvm.copysign.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_copysign(
+ // OGCG: call double @llvm.copysign.f64(
+}
+
+long double my_copysignl(long double x, long double y) {
+ return __builtin_copysignl(x, y);
+ // CHECK: cir.func no_inline dso_local @my_copysignl
+ // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_copysignl
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.copysign.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_copysignl(
+ // OGCG: call x86_fp80 @llvm.copysign.f80(
+}
+
+float copysignf(float, float);
+double copysign(double, double);
+long double copysignl(long double, long double);
+
+float call_copysignf(float x, float y) {
+ return copysignf(x, y);
+ // CHECK: cir.func no_inline dso_local @call_copysignf
+ // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_copysignf
+ // LLVM: %{{.+}} = call float @llvm.copysign.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_copysignf(
+ // OGCG: call float @llvm.copysign.f32(
+}
+
+double call_copysign(double x, double y) {
+ return copysign(x, y);
+ // CHECK: cir.func no_inline dso_local @call_copysign
+ // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_copysign
+ // LLVM: %{{.+}} = call double @llvm.copysign.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_copysign(
+ // OGCG: call double @llvm.copysign.f64(
+}
+
+long double call_copysignl(long double x, long double y) {
+ return copysignl(x, y);
+ // CHECK: cir.func no_inline dso_local @call_copysignl
+ // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_copysignl
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.copysign.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_copysignl(
+ // OGCG: call x86_fp80 @llvm.copysign.f80(
+}
+
+// fmax
+
+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
+
+ // LLVM: define dso_local float @my_fmaxf
+ // LLVM: %{{.+}} = call nsz float @llvm.maxnum.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_fmaxf(
+ // OGCG: call nsz float @llvm.maxnum.f32(
+}
+
+double my_fmax(double x, double y) {
+ return __builtin_fmax(x, y);
+ // CHECK: cir.func no_inline dso_local @my_fmax
+ // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_fmax
+ // LLVM: %{{.+}} = call nsz double @llvm.maxnum.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_fmax(
+ // OGCG: call nsz double @llvm.maxnum.f64(
+}
+
+long double my_fmaxl(long double x, long double y) {
+ return __builtin_fmaxl(x, y);
+ // CHECK: cir.func no_inline dso_local @my_fmaxl
+ // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_fmaxl
+ // LLVM: %{{.+}} = call nsz x86_fp80 @llvm.maxnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_fmaxl(
+ // OGCG: call nsz x86_fp80 @llvm.maxnum.f80(
+}
+
+float fmaxf(float, float);
+double fmax(double, double);
+long double fmaxl(long double, long double);
+
+float call_fmaxf(float x, float y) {
+ return fmaxf(x, y);
+ // CHECK: cir.func no_inline dso_local @call_fmaxf
+ // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_fmaxf
+ // LLVM: %{{.+}} = call nsz float @llvm.maxnum.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_fmaxf(
+ // OGCG: call nsz float @llvm.maxnum.f32(
+}
+
+double call_fmax(double x, double y) {
+ return fmax(x, y);
+ // CHECK: cir.func no_inline dso_local @call_fmax
+ // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_fmax
+ // LLVM: %{{.+}} = call nsz double @llvm.maxnum.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_fmax(
+ // OGCG: call nsz double @llvm.maxnum.f64(
+}
+
+long double call_fmaxl(long double x, long double y) {
+ return fmaxl(x, y);
+ // CHECK: cir.func no_inline dso_local @call_fmaxl
+ // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_fmaxl
+ // LLVM: %{{.+}} = call nsz x86_fp80 @llvm.maxnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_fmaxl(
+ // OGCG: call nsz x86_fp80 @llvm.maxnum.f80(
+}
+
+// fmin
+
+float my_fminf(float x, float y) {
+ return __builtin_fminf(x, y);
+ // CHECK: cir.func no_inline dso_local @my_fminf
+ // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_fminf
+ // LLVM: %{{.+}} = call nsz float @llvm.minnum.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_fminf(
+ // OGCG: call nsz float @llvm.minnum.f32(
+}
+
+double my_fmin(double x, double y) {
+ return __builtin_fmin(x, y);
+ // CHECK: cir.func no_inline dso_local @my_fmin
+ // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_fmin
+ // LLVM: %{{.+}} = call nsz double @llvm.minnum.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_fmin(
+ // OGCG: call nsz double @llvm.minnum.f64(
+}
+
+long double my_fminl(long double x, long double y) {
+ return __builtin_fminl(x, y);
+ // CHECK: cir.func no_inline dso_local @my_fminl
+ // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_fminl
+ // LLVM: %{{.+}} = call nsz x86_fp80 @llvm.minnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_fminl(
+ // OGCG: call nsz x86_fp80 @llvm.minnum.f80(
+}
+
+float fminf(float, float);
+double fmin(double, double);
+long double fminl(long double, long double);
+
+float call_fminf(float x, float y) {
+ return fminf(x, y);
+ // CHECK: cir.func no_inline dso_local @call_fminf
+ // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_fminf
+ // LLVM: %{{.+}} = call nsz float @llvm.minnum.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_fminf(
+ // OGCG: call nsz float @llvm.minnum.f32(
+}
+
+double call_fmin(double x, double y) {
+ return fmin(x, y);
+ // CHECK: cir.func no_inline dso_local @call_fmin
+ // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_fmin
+ // LLVM: %{{.+}} = call nsz double @llvm.minnum.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_fmin(
+ // OGCG: call nsz double @llvm.minnum.f64(
+}
+
+long double call_fminl(long double x, long double y) {
+ return fminl(x, y);
+ // CHECK: cir.func no_inline dso_local @call_fminl
+ // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_fminl
+ // LLVM: %{{.+}} = call nsz x86_fp80 @llvm.minnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_fminl(
+ // OGCG: call nsz x86_fp80 @llvm.minnum.f80(
+}
+
+// fmod
+
+float my_fmodf(float x, float y) {
+ return __builtin_fmodf(x, y);
+ // CHECK: cir.func no_inline dso_local @my_fmodf
+ // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_fmodf
+ // LLVM: %{{.+}} = frem float %{{.+}}, %{{.+}}
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_fmodf(
+ // OGCG: frem float
+}
+
+double my_fmod(double x, double y) {
+ return __builtin_fmod(x, y);
+ // CHECK: cir.func no_inline dso_local @my_fmod
+ // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_fmod
+ // LLVM: %{{.+}} = frem double %{{.+}}, %{{.+}}
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_fmod(
+ // OGCG: frem double
+}
+
+long double my_fmodl(long double x, long double y) {
+ return __builtin_fmodl(x, y);
+ // CHECK: cir.func no_inline dso_local @my_fmodl
+ // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_fmodl
+ // LLVM: %{{.+}} = frem x86_fp80 %{{.+}}, %{{.+}}
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_fmodl(
+ // OGCG: frem x86_fp80
+}
+
+float fmodf(float, float);
+double fmod(double, double);
+long double fmodl(long double, long double);
+
+float call_fmodf(float x, float y) {
+ return fmodf(x, y);
+ // CHECK: cir.func no_inline dso_local @call_fmodf
+ // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_fmodf
+ // LLVM: %{{.+}} = frem float %{{.+}}, %{{.+}}
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_fmodf(
+ // OGCG: frem float
+}
+
+double call_fmod(double x, double y) {
+ return fmod(x, y);
+ // CHECK: cir.func no_inline dso_local @call_fmod
+ // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_fmod
+ // LLVM: %{{.+}} = frem double %{{.+}}, %{{.+}}
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_fmod(
+ // OGCG: frem double
+}
+
+long double call_fmodl(long double x, long double y) {
+ return fmodl(x, y);
+ // CHECK: cir.func no_inline dso_local @call_fmodl
+ // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_fmodl
+ // LLVM: %{{.+}} = frem x86_fp80 %{{.+}}, %{{.+}}
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_fmodl(
+ // OGCG: frem x86_fp80
+}
+
+// pow
+
+float my_powf(float x, float y) {
+ return __builtin_powf(x, y);
+ // CHECK: cir.func no_inline dso_local @my_powf
+ // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_powf
+ // LLVM: %{{.+}} = call float @llvm.pow.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_powf(
+ // OGCG: call float @llvm.pow.f32(
+}
+
+double my_pow(double x, double y) {
+ return __builtin_pow(x, y);
+ // CHECK: cir.func no_inline dso_local @my_pow
+ // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_pow
+ // LLVM: %{{.+}} = call double @llvm.pow.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_pow(
+ // OGCG: call double @llvm.pow.f64(
+}
+
+long double my_powl(long double x, long double y) {
+ return __builtin_powl(x, y);
+ // CHECK: cir.func no_inline dso_local @my_powl
+ // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @my_powl
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.pow.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_powl(
+ // OGCG: call x86_fp80 @llvm.pow.f80(
+}
+
+float powf(float, float);
+double pow(double, double);
+long double powl(long double, long double);
+
+float call_powf(float x, float y) {
+ return powf(x, y);
+ // CHECK: cir.func no_inline dso_local @call_powf
+ // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @call_powf
+ // LLVM: %{{.+}} = call float @llvm.pow.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_powf(
+ // OGCG: call float @llvm.pow.f32(
+}
+
+double call_pow(double x, double y) {
+ return pow(x, y);
+ // CHECK: cir.func no_inline dso_local @call_pow
+ // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @call_pow
+ // LLVM: %{{.+}} = call double @llvm.pow.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_pow(
+ // OGCG: call double @llvm.pow.f64(
+}
+
+long double call_powl(long double x, long double y) {
+ return powl(x, y);
+ // CHECK: cir.func no_inline dso_local @call_powl
+ // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+
+ // LLVM: define dso_local x86_fp80 @call_powl
+ // LLVM: %{{.+}} = call x86_fp80 @llvm.pow.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@call_powl(
+ // OGCG: call x86_fp80 @llvm.pow.f80(
+}
+
+// acos
+
+float my_acosf(float x) {
+ return __builtin_acosf(x);
+ // CHECK: cir.func no_inline dso_local @my_acosf
+ // CHECK: %{{.+}} = cir.acos %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_acosf
+ // LLVM: %{{.+}} = call float @llvm.acos.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_acosf(
+ // OGCG: call float @llvm.acos.f32(
+}
+
+double my_acos(double x) {
+ return __builtin_acos(x);
+ // CHECK: cir.func no_inline dso_local @my_acos
+ // CHECK: %{{.+}} = cir.acos %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_acos
+ // LLVM: %{{.+}} = call double @llvm.acos.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_acos(
+ // OGCG: call double @llvm.acos.f64(
+}
+
+// asin
+
+float my_asinf(float x) {
+ return __builtin_asinf(x);
+ // CHECK: cir.func no_inline dso_local @my_asinf
+ // CHECK: %{{.+}} = cir.asin %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_asinf
+ // LLVM: %{{.+}} = call float @llvm.asin.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_asinf(
+ // OGCG: call float @llvm.asin.f32(
+}
+
+double my_asin(double x) {
+ return __builtin_asin(x);
+ // CHECK: cir.func no_inline dso_local @my_asin
+ // CHECK: %{{.+}} = cir.asin %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_asin
+ // LLVM: %{{.+}} = call double @llvm.asin.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_asin(
+ // OGCG: call double @llvm.asin.f64(
+}
+
+// atan
+
+float my_atanf(float x) {
+ return __builtin_atanf(x);
+ // CHECK: cir.func no_inline dso_local @my_atanf
+ // CHECK: %{{.+}} = cir.atan %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_atanf
+ // LLVM: %{{.+}} = call float @llvm.atan.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_atanf(
+ // OGCG: call float @llvm.atan.f32(
+}
+
+double my_atan(double x) {
+ return __builtin_atan(x);
+ // CHECK: cir.func no_inline dso_local @my_atan
+ // CHECK: %{{.+}} = cir.atan %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_atan
+ // LLVM: %{{.+}} = call double @llvm.atan.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_atan(
+ // OGCG: call double @llvm.atan.f64(
+}
+
+// atan2
+
+float my_atan2f(float y, float x) {
+ return __builtin_atan2f(y, x);
+ // CHECK: cir.func no_inline dso_local @my_atan2f
+ // CHECK: %{{.+}} = cir.atan2 %{{.+}}, %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_atan2f
+ // LLVM: %{{.+}} = call float @llvm.atan2.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_atan2f(
+ // OGCG: call float @llvm.atan2.f32(
+}
+
+double my_atan2(double y, double x) {
+ return __builtin_atan2(y, x);
+ // CHECK: cir.func no_inline dso_local @my_atan2
+ // CHECK: %{{.+}} = cir.atan2 %{{.+}}, %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_atan2
+ // LLVM: %{{.+}} = call double @llvm.atan2.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_atan2(
+ // OGCG: call double @llvm.atan2.f64(
+}
+
+// roundeven
+
+float my_roundevenf(float x) {
+ return __builtin_roundevenf(x);
+ // CHECK: cir.func no_inline dso_local @my_roundevenf
+ // CHECK: %{{.+}} = cir.roundeven %{{.+}} : !cir.float
+
+ // LLVM: define dso_local float @my_roundevenf
+ // LLVM: %{{.+}} = call float @llvm.roundeven.f32(float %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_roundevenf(
+ // OGCG: call float @llvm.roundeven.f32(
+}
+
+double my_roundeven(double x) {
+ return __builtin_roundeven(x);
+ // CHECK: cir.func no_inline dso_local @my_roundeven
+ // CHECK: %{{.+}} = cir.roundeven %{{.+}} : !cir.double
+
+ // LLVM: define dso_local double @my_roundeven
+ // LLVM: %{{.+}} = call double @llvm.roundeven.f64(double %{{.+}})
+ // LLVM: }
+
+ // OGCG: define{{.*}}@my_roundeven(
+ // OGCG: call double @llvm.roundeven.f64(
}
>From 1e9f69ef4286f903ffb7a1b35a7c839b128bec0f Mon Sep 17 00:00:00 2001
From: Ayokunle Amodu <ayokunle321 at gmail.com>
Date: Thu, 26 Feb 2026 14:29:24 -0700
Subject: [PATCH 6/7] make file names consistent
---
.../test/CIR/CodeGenBuiltins/{builtin_bit.cpp => builtin-bit.cpp} | 0
.../CIR/CodeGenBuiltins/{builtin_call.cpp => builtin-call.cpp} | 0
.../CIR/CodeGenBuiltins/{builtin_inline.c => builtin-inline.c} | 0
.../{builtin_new_delete.cpp => builtin-new-delete.cpp} | 0
.../CodeGenBuiltins/{builtin_prefetch.c => builtin-prefetch.c} | 0
.../CodeGenBuiltins/{builtin_printf.cpp => builtin-printf.cpp} | 0
6 files changed, 0 insertions(+), 0 deletions(-)
rename clang/test/CIR/CodeGenBuiltins/{builtin_bit.cpp => builtin-bit.cpp} (100%)
rename clang/test/CIR/CodeGenBuiltins/{builtin_call.cpp => builtin-call.cpp} (100%)
rename clang/test/CIR/CodeGenBuiltins/{builtin_inline.c => builtin-inline.c} (100%)
rename clang/test/CIR/CodeGenBuiltins/{builtin_new_delete.cpp => builtin-new-delete.cpp} (100%)
rename clang/test/CIR/CodeGenBuiltins/{builtin_prefetch.c => builtin-prefetch.c} (100%)
rename clang/test/CIR/CodeGenBuiltins/{builtin_printf.cpp => builtin-printf.cpp} (100%)
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin_bit.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-bit.cpp
similarity index 100%
rename from clang/test/CIR/CodeGenBuiltins/builtin_bit.cpp
rename to clang/test/CIR/CodeGenBuiltins/builtin-bit.cpp
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin_call.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-call.cpp
similarity index 100%
rename from clang/test/CIR/CodeGenBuiltins/builtin_call.cpp
rename to clang/test/CIR/CodeGenBuiltins/builtin-call.cpp
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin_inline.c b/clang/test/CIR/CodeGenBuiltins/builtin-inline.c
similarity index 100%
rename from clang/test/CIR/CodeGenBuiltins/builtin_inline.c
rename to clang/test/CIR/CodeGenBuiltins/builtin-inline.c
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin_new_delete.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-new-delete.cpp
similarity index 100%
rename from clang/test/CIR/CodeGenBuiltins/builtin_new_delete.cpp
rename to clang/test/CIR/CodeGenBuiltins/builtin-new-delete.cpp
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin_prefetch.c b/clang/test/CIR/CodeGenBuiltins/builtin-prefetch.c
similarity index 100%
rename from clang/test/CIR/CodeGenBuiltins/builtin_prefetch.c
rename to clang/test/CIR/CodeGenBuiltins/builtin-prefetch.c
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin_printf.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-printf.cpp
similarity index 100%
rename from clang/test/CIR/CodeGenBuiltins/builtin_printf.cpp
rename to clang/test/CIR/CodeGenBuiltins/builtin-printf.cpp
>From 244232e1483834124c4e4ad6c60420cc47040fd9 Mon Sep 17 00:00:00 2001
From: Ayokunle Amodu <ayokunle321 at gmail.com>
Date: Thu, 26 Feb 2026 15:51:32 -0700
Subject: [PATCH 7/7] remove return value matches and % from regex
---
.../CodeGenBuiltins/builtins-elementwise.c | 540 +++++-----
.../CodeGenBuiltins/builtins-floating-point.c | 962 +++++++++---------
2 files changed, 751 insertions(+), 751 deletions(-)
diff --git a/clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c b/clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c
index 2325897a17a7f..dcdbf197acfbc 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c
@@ -17,34 +17,34 @@ void test_builtin_elementwise_abs(vint4 vi4, int i, float f, double d,
// LLVM-LABEL: test_builtin_elementwise_abs
// OGCG-LABEL: test_builtin_elementwise_abs
- // CIR: {{%.*}} = cir.fabs {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.fabs.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.fabs.f32(float {{%.*}})
+ // CIR: cir.fabs %{{.*}} : !cir.float
+ // LLVM: call float @llvm.fabs.f32(float %{{.*}})
+ // OGCG: call float @llvm.fabs.f32(float %{{.*}})
f = __builtin_elementwise_abs(f);
- // CIR: {{%.*}} = cir.fabs {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.fabs.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.fabs.f64(double {{%.*}})
+ // CIR: cir.fabs %{{.*}} : !cir.double
+ // LLVM: call double @llvm.fabs.f64(double %{{.*}})
+ // OGCG: call double @llvm.fabs.f64(double %{{.*}})
d = __builtin_elementwise_abs(d);
- // CIR: {{%.*}} = cir.abs {{%.*}} : !cir.vector<4 x !s32i>
- // LLVM: {{%.*}} = call <4 x i32> @llvm.abs.v4i32(<4 x i32> {{%.*}}, i1 false)
- // OGCG: {{%.*}} = call <4 x i32> @llvm.abs.v4i32(<4 x i32> {{%.*}}, i1 false)
+ // CIR: cir.abs %{{.*}} : !cir.vector<4 x !s32i>
+ // LLVM: call <4 x i32> @llvm.abs.v4i32(<4 x i32> %{{.*}}, i1 false)
+ // OGCG: call <4 x i32> @llvm.abs.v4i32(<4 x i32> %{{.*}}, i1 false)
vi4 = __builtin_elementwise_abs(vi4);
- // CIR: {{%.*}} = cir.abs {{%.*}} : !s32
- // LLVM: {{%.*}} = call i32 @llvm.abs.i32(i32 {{%.*}}, i1 false)
- // OGCG: {{%.*}} = call i32 @llvm.abs.i32(i32 {{%.*}}, i1 false)
+ // CIR: cir.abs %{{.*}} : !s32
+ // LLVM: call i32 @llvm.abs.i32(i32 %{{.*}}, i1 false)
+ // OGCG: call i32 @llvm.abs.i32(i32 %{{.*}}, i1 false)
i = __builtin_elementwise_abs(i);
- // CIR: {{%.*}} = cir.fabs {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.fabs.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.fabs.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.fabs %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.fabs.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.fabs.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_abs(vf4);
- // CIR: {{%.*}} = cir.fabs {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.fabs.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.fabs.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.fabs %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.fabs.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.fabs.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_abs(vd4);
}
@@ -54,24 +54,24 @@ void test_builtin_elementwise_acos(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_acos
// OGCG-LABEL: test_builtin_elementwise_acos
- // CIR: {{%.*}} = cir.acos {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.acos.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.acos.f32(float {{%.*}})
+ // CIR: cir.acos %{{.*}} : !cir.float
+ // LLVM: call float @llvm.acos.f32(float %{{.*}})
+ // OGCG: call float @llvm.acos.f32(float %{{.*}})
f = __builtin_elementwise_acos(f);
- // CIR: {{%.*}} = cir.acos {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.acos.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.acos.f64(double {{%.*}})
+ // CIR: cir.acos %{{.*}} : !cir.double
+ // LLVM: call double @llvm.acos.f64(double %{{.*}})
+ // OGCG: call double @llvm.acos.f64(double %{{.*}})
d = __builtin_elementwise_acos(d);
- // CIR: {{%.*}} = cir.acos {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.acos.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.acos.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.acos %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.acos.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.acos.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_acos(vf4);
- // CIR: {{%.*}} = cir.acos {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.acos.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.acos.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.acos %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.acos.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.acos.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_acos(vd4);
}
@@ -81,24 +81,24 @@ void test_builtin_elementwise_asin(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_asin
// OGCG-LABEL: test_builtin_elementwise_asin
- // CIR: {{%.*}} = cir.asin {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.asin.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.asin.f32(float {{%.*}})
+ // CIR: cir.asin %{{.*}} : !cir.float
+ // LLVM: call float @llvm.asin.f32(float %{{.*}})
+ // OGCG: call float @llvm.asin.f32(float %{{.*}})
f = __builtin_elementwise_asin(f);
- // CIR: {{%.*}} = cir.asin {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.asin.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.asin.f64(double {{%.*}})
+ // CIR: cir.asin %{{.*}} : !cir.double
+ // LLVM: call double @llvm.asin.f64(double %{{.*}})
+ // OGCG: call double @llvm.asin.f64(double %{{.*}})
d = __builtin_elementwise_asin(d);
- // CIR: {{%.*}} = cir.asin {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.asin.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.asin.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.asin %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.asin.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.asin.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_asin(vf4);
- // CIR: {{%.*}} = cir.asin {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.asin.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.asin.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.asin %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.asin.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.asin.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_asin(vd4);
}
@@ -108,24 +108,24 @@ void test_builtin_elementwise_atan(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_atan
// OGCG-LABEL: test_builtin_elementwise_atan
- // CIR: {{%.*}} = cir.atan {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.atan.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.atan.f32(float {{%.*}})
+ // CIR: cir.atan %{{.*}} : !cir.float
+ // LLVM: call float @llvm.atan.f32(float %{{.*}})
+ // OGCG: call float @llvm.atan.f32(float %{{.*}})
f = __builtin_elementwise_atan(f);
- // CIR: {{%.*}} = cir.atan {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.atan.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.atan.f64(double {{%.*}})
+ // CIR: cir.atan %{{.*}} : !cir.double
+ // LLVM: call double @llvm.atan.f64(double %{{.*}})
+ // OGCG: call double @llvm.atan.f64(double %{{.*}})
d = __builtin_elementwise_atan(d);
- // CIR: {{%.*}} = cir.atan {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.atan.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.atan.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.atan %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.atan.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.atan.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_atan(vf4);
- // CIR: {{%.*}} = cir.atan {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.atan.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.atan.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.atan %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.atan.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.atan.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_atan(vd4);
}
@@ -135,24 +135,24 @@ void test_builtin_elementwise_atan2(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_atan2
// OGCG-LABEL: test_builtin_elementwise_atan2
- // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.atan2.f32(float {{%.*}}, float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.atan2.f32(float {{%.*}}, float {{%.*}})
+ // CIR: cir.atan2 %{{.*}}, %{{.*}} : !cir.float
+ // LLVM: call float @llvm.atan2.f32(float %{{.*}}, float %{{.*}})
+ // OGCG: call float @llvm.atan2.f32(float %{{.*}}, float %{{.*}})
f = __builtin_elementwise_atan2(f, f);
- // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.atan2.f64(double {{%.*}}, double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.atan2.f64(double {{%.*}}, double {{%.*}})
+ // CIR: cir.atan2 %{{.*}}, %{{.*}} : !cir.double
+ // LLVM: call double @llvm.atan2.f64(double %{{.*}}, double %{{.*}})
+ // OGCG: call double @llvm.atan2.f64(double %{{.*}}, double %{{.*}})
d = __builtin_elementwise_atan2(d, d);
- // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.atan2.v4f32(<4 x float> {{%.*}}, <4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.atan2.v4f32(<4 x float> {{%.*}}, <4 x float> {{%.*}})
+ // CIR: cir.atan2 %{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.atan2.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.atan2.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}})
vf4 = __builtin_elementwise_atan2(vf4, vf4);
- // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.atan2.v4f64(<4 x double> {{%.*}}, <4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.atan2.v4f64(<4 x double> {{%.*}}, <4 x double> {{%.*}})
+ // CIR: cir.atan2 %{{.*}}, %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.atan2.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.atan2.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}})
vd4 = __builtin_elementwise_atan2(vd4, vd4);
}
@@ -162,24 +162,24 @@ void test_builtin_elementwise_exp(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_exp
// OGCG-LABEL: test_builtin_elementwise_exp
- // CIR: {{%.*}} = cir.exp {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.exp.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.exp.f32(float {{%.*}})
+ // CIR: cir.exp %{{.*}} : !cir.float
+ // LLVM: call float @llvm.exp.f32(float %{{.*}})
+ // OGCG: call float @llvm.exp.f32(float %{{.*}})
f = __builtin_elementwise_exp(f);
- // CIR: {{%.*}} = cir.exp {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.exp.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.exp.f64(double {{%.*}})
+ // CIR: cir.exp %{{.*}} : !cir.double
+ // LLVM: call double @llvm.exp.f64(double %{{.*}})
+ // OGCG: call double @llvm.exp.f64(double %{{.*}})
d = __builtin_elementwise_exp(d);
- // CIR: {{%.*}} = cir.exp {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.exp.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.exp.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.exp %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.exp.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.exp.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_exp(vf4);
- // CIR: {{%.*}} = cir.exp {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.exp.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.exp.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.exp %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.exp.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.exp.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_exp(vd4);
}
@@ -189,24 +189,24 @@ void test_builtin_elementwise_exp2(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_exp2
// OGCG-LABEL: test_builtin_elementwise_exp2
- // CIR: {{%.*}} = cir.exp2 {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.exp2.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.exp2.f32(float {{%.*}})
+ // CIR: cir.exp2 %{{.*}} : !cir.float
+ // LLVM: call float @llvm.exp2.f32(float %{{.*}})
+ // OGCG: call float @llvm.exp2.f32(float %{{.*}})
f = __builtin_elementwise_exp2(f);
- // CIR: {{%.*}} = cir.exp2 {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.exp2.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.exp2.f64(double {{%.*}})
+ // CIR: cir.exp2 %{{.*}} : !cir.double
+ // LLVM: call double @llvm.exp2.f64(double %{{.*}})
+ // OGCG: call double @llvm.exp2.f64(double %{{.*}})
d = __builtin_elementwise_exp2(d);
- // CIR: {{%.*}} = cir.exp2 {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.exp2.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.exp2.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.exp2 %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.exp2.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.exp2.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_exp2(vf4);
- // CIR: {{%.*}} = cir.exp2 {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.exp2.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.exp2.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.exp2 %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.exp2.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.exp2.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_exp2(vd4);
}
@@ -216,24 +216,24 @@ void test_builtin_elementwise_log(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_log
// OGCG-LABEL: test_builtin_elementwise_log
- // CIR: {{%.*}} = cir.log {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.log.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.log.f32(float {{%.*}})
+ // CIR: cir.log %{{.*}} : !cir.float
+ // LLVM: call float @llvm.log.f32(float %{{.*}})
+ // OGCG: call float @llvm.log.f32(float %{{.*}})
f = __builtin_elementwise_log(f);
- // CIR: {{%.*}} = cir.log {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.log.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.log.f64(double {{%.*}})
+ // CIR: cir.log %{{.*}} : !cir.double
+ // LLVM: call double @llvm.log.f64(double %{{.*}})
+ // OGCG: call double @llvm.log.f64(double %{{.*}})
d = __builtin_elementwise_log(d);
- // CIR: {{%.*}} = cir.log {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.log.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.log.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.log %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.log.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.log.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_log(vf4);
- // CIR: {{%.*}} = cir.log {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.log.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.log.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.log %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.log.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.log.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_log(vd4);
}
@@ -243,24 +243,24 @@ void test_builtin_elementwise_log2(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_log2
// OGCG-LABEL: test_builtin_elementwise_log2
- // CIR: {{%.*}} = cir.log2 {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.log2.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.log2.f32(float {{%.*}})
+ // CIR: cir.log2 %{{.*}} : !cir.float
+ // LLVM: call float @llvm.log2.f32(float %{{.*}})
+ // OGCG: call float @llvm.log2.f32(float %{{.*}})
f = __builtin_elementwise_log2(f);
- // CIR: {{%.*}} = cir.log2 {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.log2.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.log2.f64(double {{%.*}})
+ // CIR: cir.log2 %{{.*}} : !cir.double
+ // LLVM: call double @llvm.log2.f64(double %{{.*}})
+ // OGCG: call double @llvm.log2.f64(double %{{.*}})
d = __builtin_elementwise_log2(d);
- // CIR: {{%.*}} = cir.log2 {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.log2.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.log2.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.log2 %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.log2.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.log2.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_log2(vf4);
- // CIR: {{%.*}} = cir.log2 {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.log2.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.log2.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.log2 %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.log2.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.log2.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_log2(vd4);
}
@@ -270,24 +270,24 @@ void test_builtin_elementwise_log10(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_log10
// OGCG-LABEL: test_builtin_elementwise_log10
- // CIR: {{%.*}} = cir.log10 {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.log10.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.log10.f32(float {{%.*}})
+ // CIR: cir.log10 %{{.*}} : !cir.float
+ // LLVM: call float @llvm.log10.f32(float %{{.*}})
+ // OGCG: call float @llvm.log10.f32(float %{{.*}})
f = __builtin_elementwise_log10(f);
- // CIR: {{%.*}} = cir.log10 {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.log10.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.log10.f64(double {{%.*}})
+ // CIR: cir.log10 %{{.*}} : !cir.double
+ // LLVM: call double @llvm.log10.f64(double %{{.*}})
+ // OGCG: call double @llvm.log10.f64(double %{{.*}})
d = __builtin_elementwise_log10(d);
- // CIR: {{%.*}} = cir.log10 {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.log10.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.log10.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.log10 %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.log10.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.log10.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_log10(vf4);
- // CIR: {{%.*}} = cir.log10 {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.log10.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.log10.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.log10 %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.log10.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.log10.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_log10(vd4);
}
@@ -297,24 +297,24 @@ void test_builtin_elementwise_cos(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_cos
// OGCG-LABEL: test_builtin_elementwise_cos
- // CIR: {{%.*}} = cir.cos {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.cos.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.cos.f32(float {{%.*}})
+ // CIR: cir.cos %{{.*}} : !cir.float
+ // LLVM: call float @llvm.cos.f32(float %{{.*}})
+ // OGCG: call float @llvm.cos.f32(float %{{.*}})
f = __builtin_elementwise_cos(f);
- // CIR: {{%.*}} = cir.cos {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.cos.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.cos.f64(double {{%.*}})
+ // CIR: cir.cos %{{.*}} : !cir.double
+ // LLVM: call double @llvm.cos.f64(double %{{.*}})
+ // OGCG: call double @llvm.cos.f64(double %{{.*}})
d = __builtin_elementwise_cos(d);
- // CIR: {{%.*}} = cir.cos {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.cos.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.cos.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.cos %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.cos.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.cos.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_cos(vf4);
- // CIR: {{%.*}} = cir.cos {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.cos.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.cos.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.cos %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.cos.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.cos.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_cos(vd4);
}
@@ -324,24 +324,24 @@ void test_builtin_elementwise_floor(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_floor
// OGCG-LABEL: test_builtin_elementwise_floor
- // CIR: {{%.*}} = cir.floor {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.floor.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.floor.f32(float {{%.*}})
+ // CIR: cir.floor %{{.*}} : !cir.float
+ // LLVM: call float @llvm.floor.f32(float %{{.*}})
+ // OGCG: call float @llvm.floor.f32(float %{{.*}})
f = __builtin_elementwise_floor(f);
- // CIR: {{%.*}} = cir.floor {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.floor.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.floor.f64(double {{%.*}})
+ // CIR: cir.floor %{{.*}} : !cir.double
+ // LLVM: call double @llvm.floor.f64(double %{{.*}})
+ // OGCG: call double @llvm.floor.f64(double %{{.*}})
d = __builtin_elementwise_floor(d);
- // CIR: {{%.*}} = cir.floor {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.floor.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.floor.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.floor %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.floor.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.floor.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_floor(vf4);
- // CIR: {{%.*}} = cir.floor {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.floor.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.floor.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.floor %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.floor.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.floor.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_floor(vd4);
}
@@ -351,24 +351,24 @@ void test_builtin_elementwise_round(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_round
// OGCG-LABEL: test_builtin_elementwise_round
- // CIR: {{%.*}} = cir.round {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.round.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.round.f32(float {{%.*}})
+ // CIR: cir.round %{{.*}} : !cir.float
+ // LLVM: call float @llvm.round.f32(float %{{.*}})
+ // OGCG: call float @llvm.round.f32(float %{{.*}})
f = __builtin_elementwise_round(f);
- // CIR: {{%.*}} = cir.round {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.round.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.round.f64(double {{%.*}})
+ // CIR: cir.round %{{.*}} : !cir.double
+ // LLVM: call double @llvm.round.f64(double %{{.*}})
+ // OGCG: call double @llvm.round.f64(double %{{.*}})
d = __builtin_elementwise_round(d);
- // CIR: {{%.*}} = cir.round {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.round.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.round.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.round %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.round.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.round.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_round(vf4);
- // CIR: {{%.*}} = cir.round {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.round.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.round.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.round %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.round.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.round.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_round(vd4);
}
@@ -378,24 +378,24 @@ void test_builtin_elementwise_rint(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_rint
// OGCG-LABEL: test_builtin_elementwise_rint
- // CIR: {{%.*}} = cir.rint {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.rint.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.rint.f32(float {{%.*}})
+ // CIR: cir.rint %{{.*}} : !cir.float
+ // LLVM: call float @llvm.rint.f32(float %{{.*}})
+ // OGCG: call float @llvm.rint.f32(float %{{.*}})
f = __builtin_elementwise_rint(f);
- // CIR: {{%.*}} = cir.rint {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.rint.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.rint.f64(double {{%.*}})
+ // CIR: cir.rint %{{.*}} : !cir.double
+ // LLVM: call double @llvm.rint.f64(double %{{.*}})
+ // OGCG: call double @llvm.rint.f64(double %{{.*}})
d = __builtin_elementwise_rint(d);
- // CIR: {{%.*}} = cir.rint {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.rint.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.rint.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.rint %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.rint.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.rint.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_rint(vf4);
- // CIR: {{%.*}} = cir.rint {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.rint.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.rint.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.rint %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.rint.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.rint.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_rint(vd4);
}
@@ -405,24 +405,24 @@ void test_builtin_elementwise_nearbyint(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_nearbyint
// OGCG-LABEL: test_builtin_elementwise_nearbyint
- // CIR: {{%.*}} = cir.nearbyint {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.nearbyint.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.nearbyint.f32(float {{%.*}})
+ // CIR: cir.nearbyint %{{.*}} : !cir.float
+ // LLVM: call float @llvm.nearbyint.f32(float %{{.*}})
+ // OGCG: call float @llvm.nearbyint.f32(float %{{.*}})
f = __builtin_elementwise_nearbyint(f);
- // CIR: {{%.*}} = cir.nearbyint {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.nearbyint.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.nearbyint.f64(double {{%.*}})
+ // CIR: cir.nearbyint %{{.*}} : !cir.double
+ // LLVM: call double @llvm.nearbyint.f64(double %{{.*}})
+ // OGCG: call double @llvm.nearbyint.f64(double %{{.*}})
d = __builtin_elementwise_nearbyint(d);
- // CIR: {{%.*}} = cir.nearbyint {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.nearbyint %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_nearbyint(vf4);
- // CIR: {{%.*}} = cir.nearbyint {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.nearbyint %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.nearbyint.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.nearbyint.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_nearbyint(vd4);
}
@@ -432,24 +432,24 @@ void test_builtin_elementwise_sin(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_sin
// OGCG-LABEL: test_builtin_elementwise_sin
- // CIR: {{%.*}} = cir.sin {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.sin.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.sin.f32(float {{%.*}})
+ // CIR: cir.sin %{{.*}} : !cir.float
+ // LLVM: call float @llvm.sin.f32(float %{{.*}})
+ // OGCG: call float @llvm.sin.f32(float %{{.*}})
f = __builtin_elementwise_sin(f);
- // CIR: {{%.*}} = cir.sin {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.sin.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.sin.f64(double {{%.*}})
+ // CIR: cir.sin %{{.*}} : !cir.double
+ // LLVM: call double @llvm.sin.f64(double %{{.*}})
+ // OGCG: call double @llvm.sin.f64(double %{{.*}})
d = __builtin_elementwise_sin(d);
- // CIR: {{%.*}} = cir.sin {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.sin.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.sin.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.sin %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.sin.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.sin.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_sin(vf4);
- // CIR: {{%.*}} = cir.sin {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.sin.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.sin.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.sin %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.sin.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.sin.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_sin(vd4);
}
@@ -459,24 +459,24 @@ void test_builtin_elementwise_sqrt(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_sqrt
// OGCG-LABEL: test_builtin_elementwise_sqrt
- // CIR: {{%.*}} = cir.sqrt {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.sqrt.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.sqrt.f32(float {{%.*}})
+ // CIR: cir.sqrt %{{.*}} : !cir.float
+ // LLVM: call float @llvm.sqrt.f32(float %{{.*}})
+ // OGCG: call float @llvm.sqrt.f32(float %{{.*}})
f = __builtin_elementwise_sqrt(f);
- // CIR: {{%.*}} = cir.sqrt {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.sqrt.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.sqrt.f64(double {{%.*}})
+ // CIR: cir.sqrt %{{.*}} : !cir.double
+ // LLVM: call double @llvm.sqrt.f64(double %{{.*}})
+ // OGCG: call double @llvm.sqrt.f64(double %{{.*}})
d = __builtin_elementwise_sqrt(d);
- // CIR: {{%.*}} = cir.sqrt {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.sqrt.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.sqrt.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.sqrt %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.sqrt.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.sqrt.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_sqrt(vf4);
- // CIR: {{%.*}} = cir.sqrt {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.sqrt.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.sqrt.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.sqrt %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.sqrt.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.sqrt.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_sqrt(vd4);
}
@@ -486,24 +486,24 @@ void test_builtin_elementwise_tan(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_tan
// OGCG-LABEL: test_builtin_elementwise_tan
- // CIR: {{%.*}} = cir.tan {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.tan.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.tan.f32(float {{%.*}})
+ // CIR: cir.tan %{{.*}} : !cir.float
+ // LLVM: call float @llvm.tan.f32(float %{{.*}})
+ // OGCG: call float @llvm.tan.f32(float %{{.*}})
f = __builtin_elementwise_tan(f);
- // CIR: {{%.*}} = cir.tan {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.tan.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.tan.f64(double {{%.*}})
+ // CIR: cir.tan %{{.*}} : !cir.double
+ // LLVM: call double @llvm.tan.f64(double %{{.*}})
+ // OGCG: call double @llvm.tan.f64(double %{{.*}})
d = __builtin_elementwise_tan(d);
- // CIR: {{%.*}} = cir.tan {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.tan.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.tan.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.tan %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.tan.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.tan.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_tan(vf4);
- // CIR: {{%.*}} = cir.tan {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.tan.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.tan.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.tan %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.tan.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.tan.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_tan(vd4);
}
@@ -513,24 +513,24 @@ void test_builtin_elementwise_trunc(float f, double d, vfloat4 vf4,
// LLVM-LABEL: test_builtin_elementwise_trunc
// OGCG-LABEL: test_builtin_elementwise_trunc
- // CIR: {{%.*}} = cir.trunc {{%.*}} : !cir.float
- // LLVM: {{%.*}} = call float @llvm.trunc.f32(float {{%.*}})
- // OGCG: {{%.*}} = call float @llvm.trunc.f32(float {{%.*}})
+ // CIR: cir.trunc %{{.*}} : !cir.float
+ // LLVM: call float @llvm.trunc.f32(float %{{.*}})
+ // OGCG: call float @llvm.trunc.f32(float %{{.*}})
f = __builtin_elementwise_trunc(f);
- // CIR: {{%.*}} = cir.trunc {{%.*}} : !cir.double
- // LLVM: {{%.*}} = call double @llvm.trunc.f64(double {{%.*}})
- // OGCG: {{%.*}} = call double @llvm.trunc.f64(double {{%.*}})
+ // CIR: cir.trunc %{{.*}} : !cir.double
+ // LLVM: call double @llvm.trunc.f64(double %{{.*}})
+ // OGCG: call double @llvm.trunc.f64(double %{{.*}})
d = __builtin_elementwise_trunc(d);
- // CIR: {{%.*}} = cir.trunc {{%.*}} : !cir.vector<4 x !cir.float>
- // LLVM: {{%.*}} = call <4 x float> @llvm.trunc.v4f32(<4 x float> {{%.*}})
- // OGCG: {{%.*}} = call <4 x float> @llvm.trunc.v4f32(<4 x float> {{%.*}})
+ // CIR: cir.trunc %{{.*}} : !cir.vector<4 x !cir.float>
+ // LLVM: call <4 x float> @llvm.trunc.v4f32(<4 x float> %{{.*}})
+ // OGCG: call <4 x float> @llvm.trunc.v4f32(<4 x float> %{{.*}})
vf4 = __builtin_elementwise_trunc(vf4);
- // CIR: {{%.*}} = cir.trunc {{%.*}} : !cir.vector<4 x !cir.double>
- // LLVM: {{%.*}} = call <4 x double> @llvm.trunc.v4f64(<4 x double> {{%.*}})
- // OGCG: {{%.*}} = call <4 x double> @llvm.trunc.v4f64(<4 x double> {{%.*}})
+ // CIR: cir.trunc %{{.*}} : !cir.vector<4 x !cir.double>
+ // LLVM: call <4 x double> @llvm.trunc.v4f64(<4 x double> %{{.*}})
+ // OGCG: call <4 x double> @llvm.trunc.v4f64(<4 x double> %{{.*}})
vd4 = __builtin_elementwise_trunc(vd4);
}
@@ -547,34 +547,34 @@ void test_builtin_elementwise_fshl(long long int i1, long long int i2,
// LLVM-LABEL: test_builtin_elementwise_fshl
// OGCG-LABEL: test_builtin_elementwise_fshl
- // CIR: %{{.*}} = cir.call_llvm_intrinsic "fshl" %{{.*}}, %{{.*}}, %{{.*}} : (!s64i, !s64i, !s64i) -> !s64i
- // LLVM: %{{.*}} = call i64 @llvm.fshl.i64(i64 %{{.*}}, i64 %{{.*}}, i64 %{{.*}})
- // OGCG: %{{.*}} = call i64 @llvm.fshl.i64(i64 %{{.*}}, i64 %{{.*}}, i64 %{{.*}})
+ // CIR: cir.call_llvm_intrinsic "fshl" %{{.*}}, %{{.*}}, %{{.*}} : (!s64i, !s64i, !s64i) -> !s64i
+ // LLVM: call i64 @llvm.fshl.i64(i64 %{{.*}}, i64 %{{.*}}, i64 %{{.*}})
+ // OGCG: call i64 @llvm.fshl.i64(i64 %{{.*}}, i64 %{{.*}}, i64 %{{.*}})
i1 = __builtin_elementwise_fshl(i1, i2, i3);
- // CIR: %{{.*}} = cir.call_llvm_intrinsic "fshl" %{{.*}}, %{{.*}}, %{{.*}} : (!u16i, !u16i, !u16i) -> !u16i
- // LLVM: %{{.*}} = call i16 @llvm.fshl.i16(i16 %{{.*}}, i16 %{{.*}}, i16 %{{.*}})
- // OGCG: %{{.*}} = call i16 @llvm.fshl.i16(i16 %{{.*}}, i16 %{{.*}}, i16 %{{.*}})
+ // CIR: cir.call_llvm_intrinsic "fshl" %{{.*}}, %{{.*}}, %{{.*}} : (!u16i, !u16i, !u16i) -> !u16i
+ // LLVM: call i16 @llvm.fshl.i16(i16 %{{.*}}, i16 %{{.*}}, i16 %{{.*}})
+ // OGCG: call i16 @llvm.fshl.i16(i16 %{{.*}}, i16 %{{.*}}, i16 %{{.*}})
us1 = __builtin_elementwise_fshl(us1, us2, us3);
- // CIR: %{{.*}} = cir.call_llvm_intrinsic "fshl" %{{.*}}, %{{.*}}, %{{.*}} : (!s8i, !s8i, !s8i) -> !s8i
- // LLVM: %{{.*}} = call i8 @llvm.fshl.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
- // OGCG: %{{.*}} = call i8 @llvm.fshl.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
+ // CIR: cir.call_llvm_intrinsic "fshl" %{{.*}}, %{{.*}}, %{{.*}} : (!s8i, !s8i, !s8i) -> !s8i
+ // LLVM: call i8 @llvm.fshl.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
+ // OGCG: call i8 @llvm.fshl.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
c1 = __builtin_elementwise_fshl(c1, c2, c3);
- // CIR: %{{.*}} = cir.call_llvm_intrinsic "fshl" %{{.*}}, %{{.*}}, %{{.*}} : (!u8i, !u8i, !u8i) -> !u8i
- // LLVM: %{{.*}} = call i8 @llvm.fshl.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
- // OGCG: %{{.*}} = call i8 @llvm.fshl.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
+ // CIR: cir.call_llvm_intrinsic "fshl" %{{.*}}, %{{.*}}, %{{.*}} : (!u8i, !u8i, !u8i) -> !u8i
+ // LLVM: call i8 @llvm.fshl.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
+ // OGCG: call i8 @llvm.fshl.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
uc1 = __builtin_elementwise_fshl(uc1, uc2, uc3);
- // CIR: %{{.*}} = cir.call_llvm_intrinsic "fshl" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<8 x !s16i>, !cir.vector<8 x !s16i>, !cir.vector<8 x !s16i>) -> !cir.vector<8 x !s16i>
- // LLVM: %{{.*}} = call <8 x i16> @llvm.fshl.v8i16(<8 x i16> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
- // OGCG: %{{.*}} = call <8 x i16> @llvm.fshl.v8i16(<8 x i16> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
+ // CIR: cir.call_llvm_intrinsic "fshl" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<8 x !s16i>, !cir.vector<8 x !s16i>, !cir.vector<8 x !s16i>) -> !cir.vector<8 x !s16i>
+ // LLVM: call <8 x i16> @llvm.fshl.v8i16(<8 x i16> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
+ // OGCG: call <8 x i16> @llvm.fshl.v8i16(<8 x i16> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
vi1 = __builtin_elementwise_fshl(vi1, vi2, vi3);
- // CIR: %{{.*}} = cir.call_llvm_intrinsic "fshl" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<4 x !s32i>, !cir.vector<4 x !s32i>, !cir.vector<4 x !s32i>) -> !cir.vector<4 x !s32i>
- // LLVM: %{{.*}} = call <4 x i32> @llvm.fshl.v4i32(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
- // OGCG: %{{.*}} = call <4 x i32> @llvm.fshl.v4i32(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
+ // CIR: cir.call_llvm_intrinsic "fshl" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<4 x !s32i>, !cir.vector<4 x !s32i>, !cir.vector<4 x !s32i>) -> !cir.vector<4 x !s32i>
+ // LLVM: call <4 x i32> @llvm.fshl.v4i32(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
+ // OGCG: call <4 x i32> @llvm.fshl.v4i32(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
vu1 = __builtin_elementwise_fshl(vu1, vu2, vu3);
}
@@ -590,33 +590,33 @@ void test_builtin_elementwise_fshr(long long int i1, long long int i2,
// LLVM-LABEL: test_builtin_elementwise_fshr
// OGCG-LABEL: test_builtin_elementwise_fshr
- // CIR: %{{.*}} = cir.call_llvm_intrinsic "fshr" %{{.*}}, %{{.*}}, %{{.*}} : (!s64i, !s64i, !s64i) -> !s64i
- // LLVM: %{{.*}} = call i64 @llvm.fshr.i64(i64 %{{.*}}, i64 %{{.*}}, i64 %{{.*}})
- // OGCG: %{{.*}} = call i64 @llvm.fshr.i64(i64 %{{.*}}, i64 %{{.*}}, i64 %{{.*}})
+ // CIR: cir.call_llvm_intrinsic "fshr" %{{.*}}, %{{.*}}, %{{.*}} : (!s64i, !s64i, !s64i) -> !s64i
+ // LLVM: call i64 @llvm.fshr.i64(i64 %{{.*}}, i64 %{{.*}}, i64 %{{.*}})
+ // OGCG: call i64 @llvm.fshr.i64(i64 %{{.*}}, i64 %{{.*}}, i64 %{{.*}})
i1 = __builtin_elementwise_fshr(i1, i2, i3);
- // CIR: %{{.*}} = cir.call_llvm_intrinsic "fshr" %{{.*}}, %{{.*}}, %{{.*}} : (!u16i, !u16i, !u16i) -> !u16i
- // LLVM: %{{.*}} = call i16 @llvm.fshr.i16(i16 %{{.*}}, i16 %{{.*}}, i16 %{{.*}})
- // OGCG: %{{.*}} = call i16 @llvm.fshr.i16(i16 %{{.*}}, i16 %{{.*}}, i16 %{{.*}})
+ // CIR: cir.call_llvm_intrinsic "fshr" %{{.*}}, %{{.*}}, %{{.*}} : (!u16i, !u16i, !u16i) -> !u16i
+ // LLVM: call i16 @llvm.fshr.i16(i16 %{{.*}}, i16 %{{.*}}, i16 %{{.*}})
+ // OGCG: call i16 @llvm.fshr.i16(i16 %{{.*}}, i16 %{{.*}}, i16 %{{.*}})
us1 = __builtin_elementwise_fshr(us1, us2, us3);
- // CIR: %{{.*}} = cir.call_llvm_intrinsic "fshr" %{{.*}}, %{{.*}}, %{{.*}} : (!s8i, !s8i, !s8i) -> !s8i
- // LLVM: %{{.*}} = call i8 @llvm.fshr.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
- // OGCG: %{{.*}} = call i8 @llvm.fshr.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
+ // CIR: cir.call_llvm_intrinsic "fshr" %{{.*}}, %{{.*}}, %{{.*}} : (!s8i, !s8i, !s8i) -> !s8i
+ // LLVM: call i8 @llvm.fshr.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
+ // OGCG: call i8 @llvm.fshr.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
c1 = __builtin_elementwise_fshr(c1, c2, c3);
- // CIR: %{{.*}} = cir.call_llvm_intrinsic "fshr" %{{.*}}, %{{.*}}, %{{.*}} : (!u8i, !u8i, !u8i) -> !u8i
- // LLVM: %{{.*}} = call i8 @llvm.fshr.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
- // OGCG: %{{.*}} = call i8 @llvm.fshr.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
+ // CIR: cir.call_llvm_intrinsic "fshr" %{{.*}}, %{{.*}}, %{{.*}} : (!u8i, !u8i, !u8i) -> !u8i
+ // LLVM: call i8 @llvm.fshr.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
+ // OGCG: call i8 @llvm.fshr.i8(i8 %{{.*}}, i8 %{{.*}}, i8 %{{.*}})
uc1 = __builtin_elementwise_fshr(uc1, uc2, uc3);
- // CIR: %{{.*}} = cir.call_llvm_intrinsic "fshr" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<8 x !s16i>, !cir.vector<8 x !s16i>, !cir.vector<8 x !s16i>) -> !cir.vector<8 x !s16i>
- // LLVM: %{{.*}} = call <8 x i16> @llvm.fshr.v8i16(<8 x i16> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
- // OGCG: %{{.*}} = call <8 x i16> @llvm.fshr.v8i16(<8 x i16> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
+ // CIR: cir.call_llvm_intrinsic "fshr" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<8 x !s16i>, !cir.vector<8 x !s16i>, !cir.vector<8 x !s16i>) -> !cir.vector<8 x !s16i>
+ // LLVM: call <8 x i16> @llvm.fshr.v8i16(<8 x i16> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
+ // OGCG: call <8 x i16> @llvm.fshr.v8i16(<8 x i16> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
vi1 = __builtin_elementwise_fshr(vi1, vi2, vi3);
- // CIR: %{{.*}} = cir.call_llvm_intrinsic "fshr" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<4 x !s32i>, !cir.vector<4 x !s32i>, !cir.vector<4 x !s32i>) -> !cir.vector<4 x !s32i>
- // LLVM: %{{.*}} = call <4 x i32> @llvm.fshr.v4i32(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
- // OGCG: %{{.*}} = call <4 x i32> @llvm.fshr.v4i32(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
+ // CIR: cir.call_llvm_intrinsic "fshr" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<4 x !s32i>, !cir.vector<4 x !s32i>, !cir.vector<4 x !s32i>) -> !cir.vector<4 x !s32i>
+ // LLVM: call <4 x i32> @llvm.fshr.v4i32(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
+ // OGCG: call <4 x i32> @llvm.fshr.v4i32(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
vu1 = __builtin_elementwise_fshr(vu1, vu2, vu3);
}
diff --git a/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c b/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
index 2220630272063..be82137427ea2 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
-// RUN: FileCheck --input-file=%t.cir %s
+// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
// RUN: %clang_cc1 -triple aarch64-apple-darwin-macho -fclangir -emit-cir %s -o %t-aarch64.cir
// RUN: FileCheck --input-file=%t-aarch64.cir %s --check-prefix=AARCH64
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm -o %t.ll %s
@@ -11,11 +11,11 @@
long my_lroundf(float f) {
return __builtin_lroundf(f);
- // CHECK: cir.func no_inline dso_local @my_lroundf
- // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.float -> !s64i
+ // CIR: cir.func no_inline dso_local @my_lroundf
+ // CIR: cir.lround %{{.+}} : !cir.float -> !s64i
// LLVM: define dso_local i64 @my_lroundf
- // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f32(float %{{.+}})
+ // LLVM: call i64 @llvm.lround.i64.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_lroundf(
@@ -24,11 +24,11 @@ long my_lroundf(float f) {
long my_lround(double f) {
return __builtin_lround(f);
- // CHECK: cir.func no_inline dso_local @my_lround
- // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.double -> !s64i
+ // CIR: cir.func no_inline dso_local @my_lround
+ // CIR: cir.lround %{{.+}} : !cir.double -> !s64i
// LLVM: define dso_local i64 @my_lround
- // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f64(double %{{.+}})
+ // LLVM: call i64 @llvm.lround.i64.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_lround(
@@ -37,12 +37,12 @@ long my_lround(double f) {
long my_lroundl(long double f) {
return __builtin_lroundl(f);
- // CHECK: cir.func no_inline dso_local @my_lroundl
- // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.lround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+ // CIR: cir.func no_inline dso_local @my_lroundl
+ // CIR: cir.lround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: cir.lround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
// LLVM: define dso_local i64 @my_lroundl
- // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: call i64 @llvm.lround.i64.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_lroundl(
@@ -55,11 +55,11 @@ long lroundl(long double);
long call_lroundf(float f) {
return lroundf(f);
- // CHECK: cir.func no_inline dso_local @call_lroundf
- // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.float -> !s64i
+ // CIR: cir.func no_inline dso_local @call_lroundf
+ // CIR: cir.lround %{{.+}} : !cir.float -> !s64i
// LLVM: define dso_local i64 @call_lroundf
- // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f32(float %{{.+}})
+ // LLVM: call i64 @llvm.lround.i64.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_lroundf(
@@ -68,11 +68,11 @@ long call_lroundf(float f) {
long call_lround(double f) {
return lround(f);
- // CHECK: cir.func no_inline dso_local @call_lround
- // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.double -> !s64i
+ // CIR: cir.func no_inline dso_local @call_lround
+ // CIR: cir.lround %{{.+}} : !cir.double -> !s64i
// LLVM: define dso_local i64 @call_lround
- // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f64(double %{{.+}})
+ // LLVM: call i64 @llvm.lround.i64.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_lround(
@@ -81,12 +81,12 @@ long call_lround(double f) {
long call_lroundl(long double f) {
return lroundl(f);
- // CHECK: cir.func no_inline dso_local @call_lroundl
- // CHECK: %{{.+}} = cir.lround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.lround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+ // CIR: cir.func no_inline dso_local @call_lroundl
+ // CIR: cir.lround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: cir.lround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
// LLVM: define dso_local i64 @call_lroundl
- // LLVM: %{{.+}} = call i64 @llvm.lround.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: call i64 @llvm.lround.i64.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_lroundl(
@@ -97,11 +97,11 @@ long call_lroundl(long double f) {
long long my_llroundf(float f) {
return __builtin_llroundf(f);
- // CHECK: cir.func no_inline dso_local @my_llroundf
- // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.float -> !s64i
+ // CIR: cir.func no_inline dso_local @my_llroundf
+ // CIR: cir.llround %{{.+}} : !cir.float -> !s64i
// LLVM: define dso_local i64 @my_llroundf
- // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f32(float %{{.+}})
+ // LLVM: call i64 @llvm.llround.i64.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_llroundf(
@@ -110,11 +110,11 @@ long long my_llroundf(float f) {
long long my_llround(double f) {
return __builtin_llround(f);
- // CHECK: cir.func no_inline dso_local @my_llround
- // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.double -> !s64i
+ // CIR: cir.func no_inline dso_local @my_llround
+ // CIR: cir.llround %{{.+}} : !cir.double -> !s64i
// LLVM: define dso_local i64 @my_llround
- // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f64(double %{{.+}})
+ // LLVM: call i64 @llvm.llround.i64.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_llround(
@@ -123,12 +123,12 @@ long long my_llround(double f) {
long long my_llroundl(long double f) {
return __builtin_llroundl(f);
- // CHECK: cir.func no_inline dso_local @my_llroundl
- // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.llround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+ // CIR: cir.func no_inline dso_local @my_llroundl
+ // CIR: cir.llround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: cir.llround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
// LLVM: define dso_local i64 @my_llroundl
- // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: call i64 @llvm.llround.i64.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_llroundl(
@@ -141,11 +141,11 @@ long long llroundl(long double);
long long call_llroundf(float f) {
return llroundf(f);
- // CHECK: cir.func no_inline dso_local @call_llroundf
- // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.float -> !s64i
+ // CIR: cir.func no_inline dso_local @call_llroundf
+ // CIR: cir.llround %{{.+}} : !cir.float -> !s64i
// LLVM: define dso_local i64 @call_llroundf
- // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f32(float %{{.+}})
+ // LLVM: call i64 @llvm.llround.i64.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_llroundf(
@@ -154,11 +154,11 @@ long long call_llroundf(float f) {
long long call_llround(double f) {
return llround(f);
- // CHECK: cir.func no_inline dso_local @call_llround
- // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.double -> !s64i
+ // CIR: cir.func no_inline dso_local @call_llround
+ // CIR: cir.llround %{{.+}} : !cir.double -> !s64i
// LLVM: define dso_local i64 @call_llround
- // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f64(double %{{.+}})
+ // LLVM: call i64 @llvm.llround.i64.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_llround(
@@ -167,12 +167,12 @@ long long call_llround(double f) {
long long call_llroundl(long double f) {
return llroundl(f);
- // CHECK: cir.func no_inline dso_local @call_llroundl
- // CHECK: %{{.+}} = cir.llround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.llround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+ // CIR: cir.func no_inline dso_local @call_llroundl
+ // CIR: cir.llround %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: cir.llround %{{.+}} : !cir.long_double<!cir.double> -> !s64i
// LLVM: define dso_local i64 @call_llroundl
- // LLVM: %{{.+}} = call i64 @llvm.llround.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: call i64 @llvm.llround.i64.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_llroundl(
@@ -183,11 +183,11 @@ long long call_llroundl(long double f) {
long my_lrintf(float f) {
return __builtin_lrintf(f);
- // CHECK: cir.func no_inline dso_local @my_lrintf
- // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.float -> !s64i
+ // CIR: cir.func no_inline dso_local @my_lrintf
+ // CIR: cir.lrint %{{.+}} : !cir.float -> !s64i
// LLVM: define dso_local i64 @my_lrintf
- // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f32(float %{{.+}})
+ // LLVM: call i64 @llvm.lrint.i64.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_lrintf(
@@ -196,11 +196,11 @@ long my_lrintf(float f) {
long my_lrint(double f) {
return __builtin_lrint(f);
- // CHECK: cir.func no_inline dso_local @my_lrint
- // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.double -> !s64i
+ // CIR: cir.func no_inline dso_local @my_lrint
+ // CIR: cir.lrint %{{.+}} : !cir.double -> !s64i
// LLVM: define dso_local i64 @my_lrint
- // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f64(double %{{.+}})
+ // LLVM: call i64 @llvm.lrint.i64.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_lrint(
@@ -209,12 +209,12 @@ long my_lrint(double f) {
long my_lrintl(long double f) {
return __builtin_lrintl(f);
- // CHECK: cir.func no_inline dso_local @my_lrintl
- // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+ // CIR: cir.func no_inline dso_local @my_lrintl
+ // CIR: cir.lrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: cir.lrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
// LLVM: define dso_local i64 @my_lrintl
- // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: call i64 @llvm.lrint.i64.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_lrintl(
@@ -227,11 +227,11 @@ long lrintl(long double);
long call_lrintf(float f) {
return lrintf(f);
- // CHECK: cir.func no_inline dso_local @call_lrintf
- // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.float -> !s64i
+ // CIR: cir.func no_inline dso_local @call_lrintf
+ // CIR: cir.lrint %{{.+}} : !cir.float -> !s64i
// LLVM: define dso_local i64 @call_lrintf
- // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f32(float %{{.+}})
+ // LLVM: call i64 @llvm.lrint.i64.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_lrintf(
@@ -240,11 +240,11 @@ long call_lrintf(float f) {
long call_lrint(double f) {
return lrint(f);
- // CHECK: cir.func no_inline dso_local @call_lrint
- // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.double -> !s64i
+ // CIR: cir.func no_inline dso_local @call_lrint
+ // CIR: cir.lrint %{{.+}} : !cir.double -> !s64i
// LLVM: define dso_local i64 @call_lrint
- // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f64(double %{{.+}})
+ // LLVM: call i64 @llvm.lrint.i64.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_lrint(
@@ -253,12 +253,12 @@ long call_lrint(double f) {
long call_lrintl(long double f) {
return lrintl(f);
- // CHECK: cir.func no_inline dso_local @call_lrintl
- // CHECK: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.lrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+ // CIR: cir.func no_inline dso_local @call_lrintl
+ // CIR: cir.lrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: cir.lrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
// LLVM: define dso_local i64 @call_lrintl
- // LLVM: %{{.+}} = call i64 @llvm.lrint.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: call i64 @llvm.lrint.i64.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_lrintl(
@@ -269,11 +269,11 @@ long call_lrintl(long double f) {
long long my_llrintf(float f) {
return __builtin_llrintf(f);
- // CHECK: cir.func no_inline dso_local @my_llrintf
- // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.float -> !s64i
+ // CIR: cir.func no_inline dso_local @my_llrintf
+ // CIR: cir.llrint %{{.+}} : !cir.float -> !s64i
// LLVM: define dso_local i64 @my_llrintf
- // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f32(float %{{.+}})
+ // LLVM: call i64 @llvm.llrint.i64.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_llrintf(
@@ -282,11 +282,11 @@ long long my_llrintf(float f) {
long long my_llrint(double f) {
return __builtin_llrint(f);
- // CHECK: cir.func no_inline dso_local @my_llrint
- // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.double -> !s64i
+ // CIR: cir.func no_inline dso_local @my_llrint
+ // CIR: cir.llrint %{{.+}} : !cir.double -> !s64i
// LLVM: define dso_local i64 @my_llrint
- // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f64(double %{{.+}})
+ // LLVM: call i64 @llvm.llrint.i64.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_llrint(
@@ -295,12 +295,12 @@ long long my_llrint(double f) {
long long my_llrintl(long double f) {
return __builtin_llrintl(f);
- // CHECK: cir.func no_inline dso_local @my_llrintl
- // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+ // CIR: cir.func no_inline dso_local @my_llrintl
+ // CIR: cir.llrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: cir.llrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
// LLVM: define dso_local i64 @my_llrintl
- // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: call i64 @llvm.llrint.i64.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_llrintl(
@@ -313,11 +313,11 @@ long long llrintl(long double);
long long call_llrintf(float f) {
return llrintf(f);
- // CHECK: cir.func no_inline dso_local @call_llrintf
- // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.float -> !s64i
+ // CIR: cir.func no_inline dso_local @call_llrintf
+ // CIR: cir.llrint %{{.+}} : !cir.float -> !s64i
// LLVM: define dso_local i64 @call_llrintf
- // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f32(float %{{.+}})
+ // LLVM: call i64 @llvm.llrint.i64.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_llrintf(
@@ -326,11 +326,11 @@ long long call_llrintf(float f) {
long long call_llrint(double f) {
return llrint(f);
- // CHECK: cir.func no_inline dso_local @call_llrint
- // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.double -> !s64i
+ // CIR: cir.func no_inline dso_local @call_llrint
+ // CIR: cir.llrint %{{.+}} : !cir.double -> !s64i
// LLVM: define dso_local i64 @call_llrint
- // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f64(double %{{.+}})
+ // LLVM: call i64 @llvm.llrint.i64.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_llrint(
@@ -339,12 +339,12 @@ long long call_llrint(double f) {
long long call_llrintl(long double f) {
return llrintl(f);
- // CHECK: cir.func no_inline dso_local @call_llrintl
- // CHECK: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
- // AARCH64: %{{.+}} = cir.llrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
+ // CIR: cir.func no_inline dso_local @call_llrintl
+ // CIR: cir.llrint %{{.+}} : !cir.long_double<!cir.f80> -> !s64i
+ // AARCH64: cir.llrint %{{.+}} : !cir.long_double<!cir.double> -> !s64i
// LLVM: define dso_local i64 @call_llrintl
- // LLVM: %{{.+}} = call i64 @llvm.llrint.i64.f80(x86_fp80 %{{.+}})
+ // LLVM: call i64 @llvm.llrint.i64.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_llrintl(
@@ -355,11 +355,11 @@ long long call_llrintl(long double f) {
float my_ceilf(float f) {
return __builtin_ceilf(f);
- // CHECK: cir.func no_inline dso_local @my_ceilf
- // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_ceilf
+ // CIR: {{.+}} = cir.ceil {{.+}} : !cir.float
// LLVM: define dso_local float @my_ceilf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.ceil.f32(float %{{.+}})
+ // LLVM: call float @llvm.ceil.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_ceilf(
@@ -368,11 +368,11 @@ float my_ceilf(float f) {
double my_ceil(double f) {
return __builtin_ceil(f);
- // CHECK: cir.func no_inline dso_local @my_ceil
- // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_ceil
+ // CIR: {{.+}} = cir.ceil {{.+}} : !cir.double
// LLVM: define dso_local double @my_ceil(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.ceil.f64(double %{{.+}})
+ // LLVM: call double @llvm.ceil.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_ceil(
@@ -381,12 +381,12 @@ double my_ceil(double f) {
long double my_ceill(long double f) {
return __builtin_ceill(f);
- // CHECK: cir.func no_inline dso_local @my_ceill
- // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_ceill
+ // CIR: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_ceill(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.ceil.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.ceil.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_ceill(
@@ -399,11 +399,11 @@ long double ceill(long double);
float call_ceilf(float f) {
return ceilf(f);
- // CHECK: cir.func no_inline dso_local @call_ceilf
- // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_ceilf
+ // CIR: {{.+}} = cir.ceil {{.+}} : !cir.float
// LLVM: define dso_local float @call_ceilf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.ceil.f32(float %{{.+}})
+ // LLVM: call float @llvm.ceil.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_ceilf(
@@ -412,11 +412,11 @@ float call_ceilf(float f) {
double call_ceil(double f) {
return ceil(f);
- // CHECK: cir.func no_inline dso_local @call_ceil
- // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_ceil
+ // CIR: {{.+}} = cir.ceil {{.+}} : !cir.double
// LLVM: define dso_local double @call_ceil(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.ceil.f64(double %{{.+}})
+ // LLVM: call double @llvm.ceil.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_ceil(
@@ -425,12 +425,12 @@ double call_ceil(double f) {
long double call_ceill(long double f) {
return ceill(f);
- // CHECK: cir.func no_inline dso_local @call_ceill
- // CHECK: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_ceill
+ // CIR: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.ceil {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_ceill(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.ceil.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.ceil.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_ceill(
@@ -441,11 +441,11 @@ long double call_ceill(long double f) {
float my_cosf(float f) {
return __builtin_cosf(f);
- // CHECK: cir.func no_inline dso_local @my_cosf
- // CHECK: {{.+}} = cir.cos {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_cosf
+ // CIR: {{.+}} = cir.cos {{.+}} : !cir.float
// LLVM: define dso_local float @my_cosf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.cos.f32(float %{{.+}})
+ // LLVM: call float @llvm.cos.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_cosf(
@@ -454,11 +454,11 @@ float my_cosf(float f) {
double my_cos(double f) {
return __builtin_cos(f);
- // CHECK: cir.func no_inline dso_local @my_cos
- // CHECK: {{.+}} = cir.cos {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_cos
+ // CIR: {{.+}} = cir.cos {{.+}} : !cir.double
// LLVM: define dso_local double @my_cos(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.cos.f64(double %{{.+}})
+ // LLVM: call double @llvm.cos.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_cos(
@@ -467,12 +467,12 @@ double my_cos(double f) {
long double my_cosl(long double f) {
return __builtin_cosl(f);
- // CHECK: cir.func no_inline dso_local @my_cosl
- // CHECK: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_cosl
+ // CIR: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_cosl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.cos.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.cos.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_cosl(
@@ -485,11 +485,11 @@ long double cosl(long double);
float call_cosf(float f) {
return cosf(f);
- // CHECK: cir.func no_inline dso_local @call_cosf
- // CHECK: {{.+}} = cir.cos {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_cosf
+ // CIR: {{.+}} = cir.cos {{.+}} : !cir.float
// LLVM: define dso_local float @call_cosf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.cos.f32(float %{{.+}})
+ // LLVM: call float @llvm.cos.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_cosf(
@@ -498,11 +498,11 @@ float call_cosf(float f) {
double call_cos(double f) {
return cos(f);
- // CHECK: cir.func no_inline dso_local @call_cos
- // CHECK: {{.+}} = cir.cos {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_cos
+ // CIR: {{.+}} = cir.cos {{.+}} : !cir.double
// LLVM: define dso_local double @call_cos(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.cos.f64(double %{{.+}})
+ // LLVM: call double @llvm.cos.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_cos(
@@ -511,12 +511,12 @@ double call_cos(double f) {
long double call_cosl(long double f) {
return cosl(f);
- // CHECK: cir.func no_inline dso_local @call_cosl
- // CHECK: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_cosl
+ // CIR: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.cos {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_cosl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.cos.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.cos.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_cosl(
@@ -527,11 +527,11 @@ long double call_cosl(long double f) {
float my_expf(float f) {
return __builtin_expf(f);
- // CHECK: cir.func no_inline dso_local @my_expf
- // CHECK: {{.+}} = cir.exp {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_expf
+ // CIR: {{.+}} = cir.exp {{.+}} : !cir.float
// LLVM: define dso_local float @my_expf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.exp.f32(float %{{.+}})
+ // LLVM: call float @llvm.exp.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_expf(
@@ -540,11 +540,11 @@ float my_expf(float f) {
double my_exp(double f) {
return __builtin_exp(f);
- // CHECK: cir.func no_inline dso_local @my_exp
- // CHECK: {{.+}} = cir.exp {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_exp
+ // CIR: {{.+}} = cir.exp {{.+}} : !cir.double
// LLVM: define dso_local double @my_exp(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.exp.f64(double %{{.+}})
+ // LLVM: call double @llvm.exp.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_exp(
@@ -553,12 +553,12 @@ double my_exp(double f) {
long double my_expl(long double f) {
return __builtin_expl(f);
- // CHECK: cir.func no_inline dso_local @my_expl
- // CHECK: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_expl
+ // CIR: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_expl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.exp.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.exp.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_expl(
@@ -571,11 +571,11 @@ long double expl(long double);
float call_expf(float f) {
return expf(f);
- // CHECK: cir.func no_inline dso_local @call_expf
- // CHECK: {{.+}} = cir.exp {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_expf
+ // CIR: {{.+}} = cir.exp {{.+}} : !cir.float
// LLVM: define dso_local float @call_expf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.exp.f32(float %{{.+}})
+ // LLVM: call float @llvm.exp.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_expf(
@@ -584,11 +584,11 @@ float call_expf(float f) {
double call_exp(double f) {
return exp(f);
- // CHECK: cir.func no_inline dso_local @call_exp
- // CHECK: {{.+}} = cir.exp {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_exp
+ // CIR: {{.+}} = cir.exp {{.+}} : !cir.double
// LLVM: define dso_local double @call_exp(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.exp.f64(double %{{.+}})
+ // LLVM: call double @llvm.exp.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_exp(
@@ -597,12 +597,12 @@ double call_exp(double f) {
long double call_expl(long double f) {
return expl(f);
- // CHECK: cir.func no_inline dso_local @call_expl
- // CHECK: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_expl
+ // CIR: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.exp {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_expl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.exp.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.exp.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_expl(
@@ -613,11 +613,11 @@ long double call_expl(long double f) {
float my_exp2f(float f) {
return __builtin_exp2f(f);
- // CHECK: cir.func no_inline dso_local @my_exp2f
- // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_exp2f
+ // CIR: {{.+}} = cir.exp2 {{.+}} : !cir.float
// LLVM: define dso_local float @my_exp2f(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.exp2.f32(float %{{.+}})
+ // LLVM: call float @llvm.exp2.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_exp2f(
@@ -626,11 +626,11 @@ float my_exp2f(float f) {
double my_exp2(double f) {
return __builtin_exp2(f);
- // CHECK: cir.func no_inline dso_local @my_exp2
- // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_exp2
+ // CIR: {{.+}} = cir.exp2 {{.+}} : !cir.double
// LLVM: define dso_local double @my_exp2(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.exp2.f64(double %{{.+}})
+ // LLVM: call double @llvm.exp2.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_exp2(
@@ -639,12 +639,12 @@ double my_exp2(double f) {
long double my_exp2l(long double f) {
return __builtin_exp2l(f);
- // CHECK: cir.func no_inline dso_local @my_exp2l
- // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_exp2l
+ // CIR: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_exp2l(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.exp2.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.exp2.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_exp2l(
@@ -657,11 +657,11 @@ long double exp2l(long double);
float call_exp2f(float f) {
return exp2f(f);
- // CHECK: cir.func no_inline dso_local @call_exp2f
- // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_exp2f
+ // CIR: {{.+}} = cir.exp2 {{.+}} : !cir.float
// LLVM: define dso_local float @call_exp2f(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.exp2.f32(float %{{.+}})
+ // LLVM: call float @llvm.exp2.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_exp2f(
@@ -670,11 +670,11 @@ float call_exp2f(float f) {
double call_exp2(double f) {
return exp2(f);
- // CHECK: cir.func no_inline dso_local @call_exp2
- // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_exp2
+ // CIR: {{.+}} = cir.exp2 {{.+}} : !cir.double
// LLVM: define dso_local double @call_exp2(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.exp2.f64(double %{{.+}})
+ // LLVM: call double @llvm.exp2.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_exp2(
@@ -683,12 +683,12 @@ double call_exp2(double f) {
long double call_exp2l(long double f) {
return exp2l(f);
- // CHECK: cir.func no_inline dso_local @call_exp2l
- // CHECK: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_exp2l
+ // CIR: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.exp2 {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_exp2l(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.exp2.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.exp2.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_exp2l(
@@ -699,11 +699,11 @@ long double call_exp2l(long double f) {
float my_floorf(float f) {
return __builtin_floorf(f);
- // CHECK: cir.func no_inline dso_local @my_floorf
- // CHECK: {{.+}} = cir.floor {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_floorf
+ // CIR: {{.+}} = cir.floor {{.+}} : !cir.float
// LLVM: define dso_local float @my_floorf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.floor.f32(float %{{.+}})
+ // LLVM: call float @llvm.floor.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_floorf(
@@ -712,11 +712,11 @@ float my_floorf(float f) {
double my_floor(double f) {
return __builtin_floor(f);
- // CHECK: cir.func no_inline dso_local @my_floor
- // CHECK: {{.+}} = cir.floor {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_floor
+ // CIR: {{.+}} = cir.floor {{.+}} : !cir.double
// LLVM: define dso_local double @my_floor(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.floor.f64(double %{{.+}})
+ // LLVM: call double @llvm.floor.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_floor(
@@ -725,12 +725,12 @@ double my_floor(double f) {
long double my_floorl(long double f) {
return __builtin_floorl(f);
- // CHECK: cir.func no_inline dso_local @my_floorl
- // CHECK: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_floorl
+ // CIR: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_floorl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.floor.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.floor.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_floorl(
@@ -743,11 +743,11 @@ long double floorl(long double);
float call_floorf(float f) {
return floorf(f);
- // CHECK: cir.func no_inline dso_local @call_floorf
- // CHECK: {{.+}} = cir.floor {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_floorf
+ // CIR: {{.+}} = cir.floor {{.+}} : !cir.float
// LLVM: define dso_local float @call_floorf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.floor.f32(float %{{.+}})
+ // LLVM: call float @llvm.floor.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_floorf(
@@ -756,11 +756,11 @@ float call_floorf(float f) {
double call_floor(double f) {
return floor(f);
- // CHECK: cir.func no_inline dso_local @call_floor
- // CHECK: {{.+}} = cir.floor {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_floor
+ // CIR: {{.+}} = cir.floor {{.+}} : !cir.double
// LLVM: define dso_local double @call_floor(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.floor.f64(double %{{.+}})
+ // LLVM: call double @llvm.floor.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_floor(
@@ -769,12 +769,12 @@ double call_floor(double f) {
long double call_floorl(long double f) {
return floorl(f);
- // CHECK: cir.func no_inline dso_local @call_floorl
- // CHECK: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_floorl
+ // CIR: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.floor {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_floorl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.floor.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.floor.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_floorl(
@@ -785,11 +785,11 @@ long double call_floorl(long double f) {
float my_logf(float f) {
return __builtin_logf(f);
- // CHECK: cir.func no_inline dso_local @my_logf
- // CHECK: {{.+}} = cir.log {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_logf
+ // CIR: {{.+}} = cir.log {{.+}} : !cir.float
// LLVM: define dso_local float @my_logf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.log.f32(float %{{.+}})
+ // LLVM: call float @llvm.log.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_logf(
@@ -798,11 +798,11 @@ float my_logf(float f) {
double my_log(double f) {
return __builtin_log(f);
- // CHECK: cir.func no_inline dso_local @my_log
- // CHECK: {{.+}} = cir.log {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_log
+ // CIR: {{.+}} = cir.log {{.+}} : !cir.double
// LLVM: define dso_local double @my_log(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.log.f64(double %{{.+}})
+ // LLVM: call double @llvm.log.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_log(
@@ -811,12 +811,12 @@ double my_log(double f) {
long double my_logl(long double f) {
return __builtin_logl(f);
- // CHECK: cir.func no_inline dso_local @my_logl
- // CHECK: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_logl
+ // CIR: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_logl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.log.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.log.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_logl(
@@ -829,11 +829,11 @@ long double logl(long double);
float call_logf(float f) {
return logf(f);
- // CHECK: cir.func no_inline dso_local @call_logf
- // CHECK: {{.+}} = cir.log {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_logf
+ // CIR: {{.+}} = cir.log {{.+}} : !cir.float
// LLVM: define dso_local float @call_logf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.log.f32(float %{{.+}})
+ // LLVM: call float @llvm.log.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_logf(
@@ -842,11 +842,11 @@ float call_logf(float f) {
double call_log(double f) {
return log(f);
- // CHECK: cir.func no_inline dso_local @call_log
- // CHECK: {{.+}} = cir.log {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_log
+ // CIR: {{.+}} = cir.log {{.+}} : !cir.double
// LLVM: define dso_local double @call_log(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.log.f64(double %{{.+}})
+ // LLVM: call double @llvm.log.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_log(
@@ -855,12 +855,12 @@ double call_log(double f) {
long double call_logl(long double f) {
return logl(f);
- // CHECK: cir.func no_inline dso_local @call_logl
- // CHECK: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_logl
+ // CIR: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.log {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_logl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.log.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.log.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_logl(
@@ -871,11 +871,11 @@ long double call_logl(long double f) {
float my_log10f(float f) {
return __builtin_log10f(f);
- // CHECK: cir.func no_inline dso_local @my_log10f
- // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_log10f
+ // CIR: {{.+}} = cir.log10 {{.+}} : !cir.float
// LLVM: define dso_local float @my_log10f(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.log10.f32(float %{{.+}})
+ // LLVM: call float @llvm.log10.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_log10f(
@@ -884,11 +884,11 @@ float my_log10f(float f) {
double my_log10(double f) {
return __builtin_log10(f);
- // CHECK: cir.func no_inline dso_local @my_log10
- // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_log10
+ // CIR: {{.+}} = cir.log10 {{.+}} : !cir.double
// LLVM: define dso_local double @my_log10(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.log10.f64(double %{{.+}})
+ // LLVM: call double @llvm.log10.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_log10(
@@ -897,12 +897,12 @@ double my_log10(double f) {
long double my_log10l(long double f) {
return __builtin_log10l(f);
- // CHECK: cir.func no_inline dso_local @my_log10l
- // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_log10l
+ // CIR: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_log10l(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.log10.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.log10.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_log10l(
@@ -915,11 +915,11 @@ long double log10l(long double);
float call_log10f(float f) {
return log10f(f);
- // CHECK: cir.func no_inline dso_local @call_log10f
- // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_log10f
+ // CIR: {{.+}} = cir.log10 {{.+}} : !cir.float
// LLVM: define dso_local float @call_log10f(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.log10.f32(float %{{.+}})
+ // LLVM: call float @llvm.log10.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_log10f(
@@ -928,11 +928,11 @@ float call_log10f(float f) {
double call_log10(double f) {
return log10(f);
- // CHECK: cir.func no_inline dso_local @call_log10
- // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_log10
+ // CIR: {{.+}} = cir.log10 {{.+}} : !cir.double
// LLVM: define dso_local double @call_log10(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.log10.f64(double %{{.+}})
+ // LLVM: call double @llvm.log10.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_log10(
@@ -941,12 +941,12 @@ double call_log10(double f) {
long double call_log10l(long double f) {
return log10l(f);
- // CHECK: cir.func no_inline dso_local @call_log10l
- // CHECK: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_log10l
+ // CIR: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.log10 {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_log10l(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.log10.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.log10.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_log10l(
@@ -957,11 +957,11 @@ long double call_log10l(long double f) {
float my_log2f(float f) {
return __builtin_log2f(f);
- // CHECK: cir.func no_inline dso_local @my_log2f
- // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_log2f
+ // CIR: {{.+}} = cir.log2 {{.+}} : !cir.float
// LLVM: define dso_local float @my_log2f(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.log2.f32(float %{{.+}})
+ // LLVM: call float @llvm.log2.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_log2f(
@@ -970,11 +970,11 @@ float my_log2f(float f) {
double my_log2(double f) {
return __builtin_log2(f);
- // CHECK: cir.func no_inline dso_local @my_log2
- // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_log2
+ // CIR: {{.+}} = cir.log2 {{.+}} : !cir.double
// LLVM: define dso_local double @my_log2(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.log2.f64(double %{{.+}})
+ // LLVM: call double @llvm.log2.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_log2(
@@ -983,12 +983,12 @@ double my_log2(double f) {
long double my_log2l(long double f) {
return __builtin_log2l(f);
- // CHECK: cir.func no_inline dso_local @my_log2l
- // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_log2l
+ // CIR: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_log2l(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.log2.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.log2.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_log2l(
@@ -1001,11 +1001,11 @@ long double log2l(long double);
float call_log2f(float f) {
return log2f(f);
- // CHECK: cir.func no_inline dso_local @call_log2f
- // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_log2f
+ // CIR: {{.+}} = cir.log2 {{.+}} : !cir.float
// LLVM: define dso_local float @call_log2f(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.log2.f32(float %{{.+}})
+ // LLVM: call float @llvm.log2.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_log2f(
@@ -1014,11 +1014,11 @@ float call_log2f(float f) {
double call_log2(double f) {
return log2(f);
- // CHECK: cir.func no_inline dso_local @call_log2
- // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_log2
+ // CIR: {{.+}} = cir.log2 {{.+}} : !cir.double
// LLVM: define dso_local double @call_log2(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.log2.f64(double %{{.+}})
+ // LLVM: call double @llvm.log2.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_log2(
@@ -1027,12 +1027,12 @@ double call_log2(double f) {
long double call_log2l(long double f) {
return log2l(f);
- // CHECK: cir.func no_inline dso_local @call_log2l
- // CHECK: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_log2l
+ // CIR: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.log2 {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_log2l(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.log2.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.log2.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_log2l(
@@ -1043,11 +1043,11 @@ long double call_log2l(long double f) {
float my_nearbyintf(float f) {
return __builtin_nearbyintf(f);
- // CHECK: cir.func no_inline dso_local @my_nearbyintf
- // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_nearbyintf
+ // CIR: {{.+}} = cir.nearbyint {{.+}} : !cir.float
// LLVM: define dso_local float @my_nearbyintf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.nearbyint.f32(float %{{.+}})
+ // LLVM: call float @llvm.nearbyint.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_nearbyintf(
@@ -1056,11 +1056,11 @@ float my_nearbyintf(float f) {
double my_nearbyint(double f) {
return __builtin_nearbyint(f);
- // CHECK: cir.func no_inline dso_local @my_nearbyint
- // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_nearbyint
+ // CIR: {{.+}} = cir.nearbyint {{.+}} : !cir.double
// LLVM: define dso_local double @my_nearbyint(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.nearbyint.f64(double %{{.+}})
+ // LLVM: call double @llvm.nearbyint.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_nearbyint(
@@ -1069,12 +1069,12 @@ double my_nearbyint(double f) {
long double my_nearbyintl(long double f) {
return __builtin_nearbyintl(f);
- // CHECK: cir.func no_inline dso_local @my_nearbyintl
- // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_nearbyintl
+ // CIR: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_nearbyintl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.nearbyint.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.nearbyint.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_nearbyintl(
@@ -1087,11 +1087,11 @@ long double nearbyintl(long double);
float call_nearbyintf(float f) {
return nearbyintf(f);
- // CHECK: cir.func no_inline dso_local @call_nearbyintf
- // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_nearbyintf
+ // CIR: {{.+}} = cir.nearbyint {{.+}} : !cir.float
// LLVM: define dso_local float @call_nearbyintf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.nearbyint.f32(float %{{.+}})
+ // LLVM: call float @llvm.nearbyint.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_nearbyintf(
@@ -1100,11 +1100,11 @@ float call_nearbyintf(float f) {
double call_nearbyint(double f) {
return nearbyint(f);
- // CHECK: cir.func no_inline dso_local @call_nearbyint
- // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_nearbyint
+ // CIR: {{.+}} = cir.nearbyint {{.+}} : !cir.double
// LLVM: define dso_local double @call_nearbyint(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.nearbyint.f64(double %{{.+}})
+ // LLVM: call double @llvm.nearbyint.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_nearbyint(
@@ -1113,12 +1113,12 @@ double call_nearbyint(double f) {
long double call_nearbyintl(long double f) {
return nearbyintl(f);
- // CHECK: cir.func no_inline dso_local @call_nearbyintl
- // CHECK: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_nearbyintl
+ // CIR: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.nearbyint {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_nearbyintl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.nearbyint.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.nearbyint.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_nearbyintl(
@@ -1129,11 +1129,11 @@ long double call_nearbyintl(long double f) {
float my_rintf(float f) {
return __builtin_rintf(f);
- // CHECK: cir.func no_inline dso_local @my_rintf
- // CHECK: {{.+}} = cir.rint {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_rintf
+ // CIR: {{.+}} = cir.rint {{.+}} : !cir.float
// LLVM: define dso_local float @my_rintf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.rint.f32(float %{{.+}})
+ // LLVM: call float @llvm.rint.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_rintf(
@@ -1142,11 +1142,11 @@ float my_rintf(float f) {
double my_rint(double f) {
return __builtin_rint(f);
- // CHECK: cir.func no_inline dso_local @my_rint
- // CHECK: {{.+}} = cir.rint {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_rint
+ // CIR: {{.+}} = cir.rint {{.+}} : !cir.double
// LLVM: define dso_local double @my_rint(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.rint.f64(double %{{.+}})
+ // LLVM: call double @llvm.rint.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_rint(
@@ -1155,12 +1155,12 @@ double my_rint(double f) {
long double my_rintl(long double f) {
return __builtin_rintl(f);
- // CHECK: cir.func no_inline dso_local @my_rintl
- // CHECK: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_rintl
+ // CIR: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_rintl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.rint.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.rint.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_rintl(
@@ -1173,11 +1173,11 @@ long double rintl(long double);
float call_rintf(float f) {
return rintf(f);
- // CHECK: cir.func no_inline dso_local @call_rintf
- // CHECK: {{.+}} = cir.rint {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_rintf
+ // CIR: {{.+}} = cir.rint {{.+}} : !cir.float
// LLVM: define dso_local float @call_rintf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.rint.f32(float %{{.+}})
+ // LLVM: call float @llvm.rint.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_rintf(
@@ -1186,11 +1186,11 @@ float call_rintf(float f) {
double call_rint(double f) {
return rint(f);
- // CHECK: cir.func no_inline dso_local @call_rint
- // CHECK: {{.+}} = cir.rint {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_rint
+ // CIR: {{.+}} = cir.rint {{.+}} : !cir.double
// LLVM: define dso_local double @call_rint(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.rint.f64(double %{{.+}})
+ // LLVM: call double @llvm.rint.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_rint(
@@ -1199,12 +1199,12 @@ double call_rint(double f) {
long double call_rintl(long double f) {
return rintl(f);
- // CHECK: cir.func no_inline dso_local @call_rintl
- // CHECK: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_rintl
+ // CIR: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.rint {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_rintl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.rint.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.rint.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_rintl(
@@ -1215,11 +1215,11 @@ long double call_rintl(long double f) {
float my_roundf(float f) {
return __builtin_roundf(f);
- // CHECK: cir.func no_inline dso_local @my_roundf
- // CHECK: {{.+}} = cir.round {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_roundf
+ // CIR: {{.+}} = cir.round {{.+}} : !cir.float
// LLVM: define dso_local float @my_roundf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.round.f32(float %{{.+}})
+ // LLVM: call float @llvm.round.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_roundf(
@@ -1228,11 +1228,11 @@ float my_roundf(float f) {
double my_round(double f) {
return __builtin_round(f);
- // CHECK: cir.func no_inline dso_local @my_round
- // CHECK: {{.+}} = cir.round {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_round
+ // CIR: {{.+}} = cir.round {{.+}} : !cir.double
// LLVM: define dso_local double @my_round(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.round.f64(double %{{.+}})
+ // LLVM: call double @llvm.round.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_round(
@@ -1241,12 +1241,12 @@ double my_round(double f) {
long double my_roundl(long double f) {
return __builtin_roundl(f);
- // CHECK: cir.func no_inline dso_local @my_roundl
- // CHECK: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_roundl
+ // CIR: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_roundl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.round.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.round.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_roundl(
@@ -1259,11 +1259,11 @@ long double roundl(long double);
float call_roundf(float f) {
return roundf(f);
- // CHECK: cir.func no_inline dso_local @call_roundf
- // CHECK: {{.+}} = cir.round {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_roundf
+ // CIR: {{.+}} = cir.round {{.+}} : !cir.float
// LLVM: define dso_local float @call_roundf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.round.f32(float %{{.+}})
+ // LLVM: call float @llvm.round.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_roundf(
@@ -1272,11 +1272,11 @@ float call_roundf(float f) {
double call_round(double f) {
return round(f);
- // CHECK: cir.func no_inline dso_local @call_round
- // CHECK: {{.+}} = cir.round {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_round
+ // CIR: {{.+}} = cir.round {{.+}} : !cir.double
// LLVM: define dso_local double @call_round(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.round.f64(double %{{.+}})
+ // LLVM: call double @llvm.round.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_round(
@@ -1285,12 +1285,12 @@ double call_round(double f) {
long double call_roundl(long double f) {
return roundl(f);
- // CHECK: cir.func no_inline dso_local @call_roundl
- // CHECK: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_roundl
+ // CIR: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.round {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_roundl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.round.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.round.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_roundl(
@@ -1301,11 +1301,11 @@ long double call_roundl(long double f) {
float my_sinf(float f) {
return __builtin_sinf(f);
- // CHECK: cir.func no_inline dso_local @my_sinf
- // CHECK: {{.+}} = cir.sin {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_sinf
+ // CIR: {{.+}} = cir.sin {{.+}} : !cir.float
// LLVM: define dso_local float @my_sinf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.sin.f32(float %{{.+}})
+ // LLVM: call float @llvm.sin.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_sinf(
@@ -1314,11 +1314,11 @@ float my_sinf(float f) {
double my_sin(double f) {
return __builtin_sin(f);
- // CHECK: cir.func no_inline dso_local @my_sin
- // CHECK: {{.+}} = cir.sin {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_sin
+ // CIR: {{.+}} = cir.sin {{.+}} : !cir.double
// LLVM: define dso_local double @my_sin(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.sin.f64(double %{{.+}})
+ // LLVM: call double @llvm.sin.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_sin(
@@ -1327,12 +1327,12 @@ double my_sin(double f) {
long double my_sinl(long double f) {
return __builtin_sinl(f);
- // CHECK: cir.func no_inline dso_local @my_sinl
- // CHECK: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_sinl
+ // CIR: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_sinl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.sin.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.sin.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_sinl(
@@ -1345,11 +1345,11 @@ long double sinl(long double);
float call_sinf(float f) {
return sinf(f);
- // CHECK: cir.func no_inline dso_local @call_sinf
- // CHECK: {{.+}} = cir.sin {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_sinf
+ // CIR: {{.+}} = cir.sin {{.+}} : !cir.float
// LLVM: define dso_local float @call_sinf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.sin.f32(float %{{.+}})
+ // LLVM: call float @llvm.sin.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_sinf(
@@ -1358,11 +1358,11 @@ float call_sinf(float f) {
double call_sin(double f) {
return sin(f);
- // CHECK: cir.func no_inline dso_local @call_sin
- // CHECK: {{.+}} = cir.sin {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_sin
+ // CIR: {{.+}} = cir.sin {{.+}} : !cir.double
// LLVM: define dso_local double @call_sin(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.sin.f64(double %{{.+}})
+ // LLVM: call double @llvm.sin.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_sin(
@@ -1371,12 +1371,12 @@ double call_sin(double f) {
long double call_sinl(long double f) {
return sinl(f);
- // CHECK: cir.func no_inline dso_local @call_sinl
- // CHECK: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_sinl
+ // CIR: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.sin {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_sinl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.sin.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.sin.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_sinl(
@@ -1387,11 +1387,11 @@ long double call_sinl(long double f) {
float my_sqrtf(float f) {
return __builtin_sqrtf(f);
- // CHECK: cir.func no_inline dso_local @my_sqrtf
- // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_sqrtf
+ // CIR: {{.+}} = cir.sqrt {{.+}} : !cir.float
// LLVM: define dso_local float @my_sqrtf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.sqrt.f32(float %{{.+}})
+ // LLVM: call float @llvm.sqrt.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_sqrtf(
@@ -1400,11 +1400,11 @@ float my_sqrtf(float f) {
double my_sqrt(double f) {
return __builtin_sqrt(f);
- // CHECK: cir.func no_inline dso_local @my_sqrt
- // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_sqrt
+ // CIR: {{.+}} = cir.sqrt {{.+}} : !cir.double
// LLVM: define dso_local double @my_sqrt(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.sqrt.f64(double %{{.+}})
+ // LLVM: call double @llvm.sqrt.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_sqrt(
@@ -1413,12 +1413,12 @@ double my_sqrt(double f) {
long double my_sqrtl(long double f) {
return __builtin_sqrtl(f);
- // CHECK: cir.func no_inline dso_local @my_sqrtl
- // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_sqrtl
+ // CIR: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_sqrtl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.sqrt.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_sqrtl(
@@ -1431,11 +1431,11 @@ long double sqrtl(long double);
float call_sqrtf(float f) {
return sqrtf(f);
- // CHECK: cir.func no_inline dso_local @call_sqrtf
- // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_sqrtf
+ // CIR: {{.+}} = cir.sqrt {{.+}} : !cir.float
// LLVM: define dso_local float @call_sqrtf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.sqrt.f32(float %{{.+}})
+ // LLVM: call float @llvm.sqrt.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_sqrtf(
@@ -1444,11 +1444,11 @@ float call_sqrtf(float f) {
double call_sqrt(double f) {
return sqrt(f);
- // CHECK: cir.func no_inline dso_local @call_sqrt
- // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_sqrt
+ // CIR: {{.+}} = cir.sqrt {{.+}} : !cir.double
// LLVM: define dso_local double @call_sqrt(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.sqrt.f64(double %{{.+}})
+ // LLVM: call double @llvm.sqrt.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_sqrt(
@@ -1457,12 +1457,12 @@ double call_sqrt(double f) {
long double call_sqrtl(long double f) {
return sqrtl(f);
- // CHECK: cir.func no_inline dso_local @call_sqrtl
- // CHECK: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_sqrtl
+ // CIR: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.sqrt {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_sqrtl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.sqrt.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_sqrtl(
@@ -1473,11 +1473,11 @@ long double call_sqrtl(long double f) {
float my_tanf(float f) {
return __builtin_tanf(f);
- // CHECK: cir.func no_inline dso_local @my_tanf
- // CHECK: {{.+}} = cir.tan {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_tanf
+ // CIR: {{.+}} = cir.tan {{.+}} : !cir.float
// LLVM: define dso_local float @my_tanf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.tan.f32(float %{{.+}})
+ // LLVM: call float @llvm.tan.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_tanf(
@@ -1486,11 +1486,11 @@ float my_tanf(float f) {
double my_tan(double f) {
return __builtin_tan(f);
- // CHECK: cir.func no_inline dso_local @my_tan
- // CHECK: {{.+}} = cir.tan {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_tan
+ // CIR: {{.+}} = cir.tan {{.+}} : !cir.double
// LLVM: define dso_local double @my_tan(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.tan.f64(double %{{.+}})
+ // LLVM: call double @llvm.tan.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_tan(
@@ -1499,12 +1499,12 @@ double my_tan(double f) {
long double my_tanl(long double f) {
return __builtin_tanl(f);
- // CHECK: cir.func no_inline dso_local @my_tanl
- // CHECK: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_tanl
+ // CIR: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_tanl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.tan.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.tan.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_tanl(
@@ -1517,11 +1517,11 @@ long double tanl(long double);
float call_tanf(float f) {
return tanf(f);
- // CHECK: cir.func no_inline dso_local @call_tanf
- // CHECK: {{.+}} = cir.tan {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_tanf
+ // CIR: {{.+}} = cir.tan {{.+}} : !cir.float
// LLVM: define dso_local float @call_tanf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.tan.f32(float %{{.+}})
+ // LLVM: call float @llvm.tan.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_tanf(
@@ -1530,11 +1530,11 @@ float call_tanf(float f) {
double call_tan(double f) {
return tan(f);
- // CHECK: cir.func no_inline dso_local @call_tan
- // CHECK: {{.+}} = cir.tan {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_tan
+ // CIR: {{.+}} = cir.tan {{.+}} : !cir.double
// LLVM: define dso_local double @call_tan(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.tan.f64(double %{{.+}})
+ // LLVM: call double @llvm.tan.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_tan(
@@ -1543,12 +1543,12 @@ double call_tan(double f) {
long double call_tanl(long double f) {
return tanl(f);
- // CHECK: cir.func no_inline dso_local @call_tanl
- // CHECK: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_tanl
+ // CIR: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.tan {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_tanl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.tan.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.tan.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_tanl(
@@ -1559,11 +1559,11 @@ long double call_tanl(long double f) {
float my_truncf(float f) {
return __builtin_truncf(f);
- // CHECK: cir.func no_inline dso_local @my_truncf
- // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_truncf
+ // CIR: {{.+}} = cir.trunc {{.+}} : !cir.float
// LLVM: define dso_local float @my_truncf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.trunc.f32(float %{{.+}})
+ // LLVM: call float @llvm.trunc.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_truncf(
@@ -1572,11 +1572,11 @@ float my_truncf(float f) {
double my_trunc(double f) {
return __builtin_trunc(f);
- // CHECK: cir.func no_inline dso_local @my_trunc
- // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_trunc
+ // CIR: {{.+}} = cir.trunc {{.+}} : !cir.double
// LLVM: define dso_local double @my_trunc(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.trunc.f64(double %{{.+}})
+ // LLVM: call double @llvm.trunc.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_trunc(
@@ -1585,12 +1585,12 @@ double my_trunc(double f) {
long double my_truncl(long double f) {
return __builtin_truncl(f);
- // CHECK: cir.func no_inline dso_local @my_truncl
- // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @my_truncl
+ // CIR: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_truncl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.trunc.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.trunc.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_truncl(
@@ -1603,11 +1603,11 @@ long double truncl(long double);
float call_truncf(float f) {
return truncf(f);
- // CHECK: cir.func no_inline dso_local @call_truncf
- // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_truncf
+ // CIR: {{.+}} = cir.trunc {{.+}} : !cir.float
// LLVM: define dso_local float @call_truncf(float noundef %0)
- // LLVM: %{{.+}} = call float @llvm.trunc.f32(float %{{.+}})
+ // LLVM: call float @llvm.trunc.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_truncf(
@@ -1616,11 +1616,11 @@ float call_truncf(float f) {
double call_trunc(double f) {
return trunc(f);
- // CHECK: cir.func no_inline dso_local @call_trunc
- // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_trunc
+ // CIR: {{.+}} = cir.trunc {{.+}} : !cir.double
// LLVM: define dso_local double @call_trunc(double noundef %0)
- // LLVM: %{{.+}} = call double @llvm.trunc.f64(double %{{.+}})
+ // LLVM: call double @llvm.trunc.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_trunc(
@@ -1629,12 +1629,12 @@ double call_trunc(double f) {
long double call_truncl(long double f) {
return truncl(f);
- // CHECK: cir.func no_inline dso_local @call_truncl
- // CHECK: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.f80>
+ // CIR: cir.func no_inline dso_local @call_truncl
+ // CIR: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.f80>
// AARCH64: {{.+}} = cir.trunc {{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_truncl(x86_fp80 noundef %0)
- // LLVM: %{{.+}} = call x86_fp80 @llvm.trunc.f80(x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.trunc.f80(x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_truncl(
@@ -1645,11 +1645,11 @@ long double call_truncl(long double f) {
float my_copysignf(float x, float y) {
return __builtin_copysignf(x, y);
- // CHECK: cir.func no_inline dso_local @my_copysignf
- // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_copysignf
+ // CIR: cir.copysign %{{.+}}, %{{.+}} : !cir.float
// LLVM: define dso_local float @my_copysignf
- // LLVM: %{{.+}} = call float @llvm.copysign.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: call float @llvm.copysign.f32(float %{{.+}}, float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_copysignf(
@@ -1658,11 +1658,11 @@ float my_copysignf(float x, float y) {
double my_copysign(double x, double y) {
return __builtin_copysign(x, y);
- // CHECK: cir.func no_inline dso_local @my_copysign
- // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_copysign
+ // CIR: cir.copysign %{{.+}}, %{{.+}} : !cir.double
// LLVM: define dso_local double @my_copysign
- // LLVM: %{{.+}} = call double @llvm.copysign.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: call double @llvm.copysign.f64(double %{{.+}}, double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_copysign(
@@ -1671,12 +1671,12 @@ double my_copysign(double x, double y) {
long double my_copysignl(long double x, long double y) {
return __builtin_copysignl(x, y);
- // CHECK: cir.func no_inline dso_local @my_copysignl
- // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+ // CIR: cir.func no_inline dso_local @my_copysignl
+ // CIR: cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_copysignl
- // LLVM: %{{.+}} = call x86_fp80 @llvm.copysign.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.copysign.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_copysignl(
@@ -1689,11 +1689,11 @@ long double copysignl(long double, long double);
float call_copysignf(float x, float y) {
return copysignf(x, y);
- // CHECK: cir.func no_inline dso_local @call_copysignf
- // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_copysignf
+ // CIR: cir.copysign %{{.+}}, %{{.+}} : !cir.float
// LLVM: define dso_local float @call_copysignf
- // LLVM: %{{.+}} = call float @llvm.copysign.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: call float @llvm.copysign.f32(float %{{.+}}, float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_copysignf(
@@ -1702,11 +1702,11 @@ float call_copysignf(float x, float y) {
double call_copysign(double x, double y) {
return copysign(x, y);
- // CHECK: cir.func no_inline dso_local @call_copysign
- // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_copysign
+ // CIR: cir.copysign %{{.+}}, %{{.+}} : !cir.double
// LLVM: define dso_local double @call_copysign
- // LLVM: %{{.+}} = call double @llvm.copysign.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: call double @llvm.copysign.f64(double %{{.+}}, double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_copysign(
@@ -1715,12 +1715,12 @@ double call_copysign(double x, double y) {
long double call_copysignl(long double x, long double y) {
return copysignl(x, y);
- // CHECK: cir.func no_inline dso_local @call_copysignl
- // CHECK: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+ // CIR: cir.func no_inline dso_local @call_copysignl
+ // CIR: cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: cir.copysign %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_copysignl
- // LLVM: %{{.+}} = call x86_fp80 @llvm.copysign.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.copysign.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_copysignl(
@@ -1731,11 +1731,11 @@ 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: cir.func no_inline dso_local @my_fmaxf
+ // CIR: cir.fmaxnum %{{.+}}, %{{.+}} : !cir.float
// LLVM: define dso_local float @my_fmaxf
- // LLVM: %{{.+}} = call nsz float @llvm.maxnum.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: call nsz float @llvm.maxnum.f32(float %{{.+}}, float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_fmaxf(
@@ -1744,11 +1744,11 @@ float my_fmaxf(float x, float y) {
double my_fmax(double x, double y) {
return __builtin_fmax(x, y);
- // CHECK: cir.func no_inline dso_local @my_fmax
- // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_fmax
+ // CIR: cir.fmaxnum %{{.+}}, %{{.+}} : !cir.double
// LLVM: define dso_local double @my_fmax
- // LLVM: %{{.+}} = call nsz double @llvm.maxnum.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: call nsz double @llvm.maxnum.f64(double %{{.+}}, double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_fmax(
@@ -1757,12 +1757,12 @@ double my_fmax(double x, double y) {
long double my_fmaxl(long double x, long double y) {
return __builtin_fmaxl(x, y);
- // CHECK: cir.func no_inline dso_local @my_fmaxl
- // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+ // CIR: cir.func no_inline dso_local @my_fmaxl
+ // CIR: cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_fmaxl
- // LLVM: %{{.+}} = call nsz x86_fp80 @llvm.maxnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: call nsz x86_fp80 @llvm.maxnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_fmaxl(
@@ -1775,11 +1775,11 @@ long double fmaxl(long double, long double);
float call_fmaxf(float x, float y) {
return fmaxf(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmaxf
- // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_fmaxf
+ // CIR: cir.fmaxnum %{{.+}}, %{{.+}} : !cir.float
// LLVM: define dso_local float @call_fmaxf
- // LLVM: %{{.+}} = call nsz float @llvm.maxnum.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: call nsz float @llvm.maxnum.f32(float %{{.+}}, float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_fmaxf(
@@ -1788,11 +1788,11 @@ float call_fmaxf(float x, float y) {
double call_fmax(double x, double y) {
return fmax(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmax
- // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_fmax
+ // CIR: cir.fmaxnum %{{.+}}, %{{.+}} : !cir.double
// LLVM: define dso_local double @call_fmax
- // LLVM: %{{.+}} = call nsz double @llvm.maxnum.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: call nsz double @llvm.maxnum.f64(double %{{.+}}, double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_fmax(
@@ -1801,12 +1801,12 @@ double call_fmax(double x, double y) {
long double call_fmaxl(long double x, long double y) {
return fmaxl(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmaxl
- // CHECK: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+ // CIR: cir.func no_inline dso_local @call_fmaxl
+ // CIR: cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: cir.fmaxnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_fmaxl
- // LLVM: %{{.+}} = call nsz x86_fp80 @llvm.maxnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: call nsz x86_fp80 @llvm.maxnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_fmaxl(
@@ -1817,11 +1817,11 @@ long double call_fmaxl(long double x, long double y) {
float my_fminf(float x, float y) {
return __builtin_fminf(x, y);
- // CHECK: cir.func no_inline dso_local @my_fminf
- // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_fminf
+ // CIR: cir.fminnum %{{.+}}, %{{.+}} : !cir.float
// LLVM: define dso_local float @my_fminf
- // LLVM: %{{.+}} = call nsz float @llvm.minnum.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: call nsz float @llvm.minnum.f32(float %{{.+}}, float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_fminf(
@@ -1830,11 +1830,11 @@ float my_fminf(float x, float y) {
double my_fmin(double x, double y) {
return __builtin_fmin(x, y);
- // CHECK: cir.func no_inline dso_local @my_fmin
- // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_fmin
+ // CIR: cir.fminnum %{{.+}}, %{{.+}} : !cir.double
// LLVM: define dso_local double @my_fmin
- // LLVM: %{{.+}} = call nsz double @llvm.minnum.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: call nsz double @llvm.minnum.f64(double %{{.+}}, double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_fmin(
@@ -1843,12 +1843,12 @@ double my_fmin(double x, double y) {
long double my_fminl(long double x, long double y) {
return __builtin_fminl(x, y);
- // CHECK: cir.func no_inline dso_local @my_fminl
- // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+ // CIR: cir.func no_inline dso_local @my_fminl
+ // CIR: cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_fminl
- // LLVM: %{{.+}} = call nsz x86_fp80 @llvm.minnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: call nsz x86_fp80 @llvm.minnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_fminl(
@@ -1861,11 +1861,11 @@ long double fminl(long double, long double);
float call_fminf(float x, float y) {
return fminf(x, y);
- // CHECK: cir.func no_inline dso_local @call_fminf
- // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_fminf
+ // CIR: cir.fminnum %{{.+}}, %{{.+}} : !cir.float
// LLVM: define dso_local float @call_fminf
- // LLVM: %{{.+}} = call nsz float @llvm.minnum.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: call nsz float @llvm.minnum.f32(float %{{.+}}, float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_fminf(
@@ -1874,11 +1874,11 @@ float call_fminf(float x, float y) {
double call_fmin(double x, double y) {
return fmin(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmin
- // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_fmin
+ // CIR: cir.fminnum %{{.+}}, %{{.+}} : !cir.double
// LLVM: define dso_local double @call_fmin
- // LLVM: %{{.+}} = call nsz double @llvm.minnum.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: call nsz double @llvm.minnum.f64(double %{{.+}}, double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_fmin(
@@ -1887,12 +1887,12 @@ double call_fmin(double x, double y) {
long double call_fminl(long double x, long double y) {
return fminl(x, y);
- // CHECK: cir.func no_inline dso_local @call_fminl
- // CHECK: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+ // CIR: cir.func no_inline dso_local @call_fminl
+ // CIR: cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: cir.fminnum %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_fminl
- // LLVM: %{{.+}} = call nsz x86_fp80 @llvm.minnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: call nsz x86_fp80 @llvm.minnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_fminl(
@@ -1903,11 +1903,11 @@ long double call_fminl(long double x, long double y) {
float my_fmodf(float x, float y) {
return __builtin_fmodf(x, y);
- // CHECK: cir.func no_inline dso_local @my_fmodf
- // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_fmodf
+ // CIR: cir.fmod %{{.+}}, %{{.+}} : !cir.float
// LLVM: define dso_local float @my_fmodf
- // LLVM: %{{.+}} = frem float %{{.+}}, %{{.+}}
+ // LLVM: frem float %{{.+}}, %{{.+}}
// LLVM: }
// OGCG: define{{.*}}@my_fmodf(
@@ -1916,11 +1916,11 @@ float my_fmodf(float x, float y) {
double my_fmod(double x, double y) {
return __builtin_fmod(x, y);
- // CHECK: cir.func no_inline dso_local @my_fmod
- // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_fmod
+ // CIR: cir.fmod %{{.+}}, %{{.+}} : !cir.double
// LLVM: define dso_local double @my_fmod
- // LLVM: %{{.+}} = frem double %{{.+}}, %{{.+}}
+ // LLVM: frem double %{{.+}}, %{{.+}}
// LLVM: }
// OGCG: define{{.*}}@my_fmod(
@@ -1929,12 +1929,12 @@ double my_fmod(double x, double y) {
long double my_fmodl(long double x, long double y) {
return __builtin_fmodl(x, y);
- // CHECK: cir.func no_inline dso_local @my_fmodl
- // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+ // CIR: cir.func no_inline dso_local @my_fmodl
+ // CIR: cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_fmodl
- // LLVM: %{{.+}} = frem x86_fp80 %{{.+}}, %{{.+}}
+ // LLVM: frem x86_fp80 %{{.+}}, %{{.+}}
// LLVM: }
// OGCG: define{{.*}}@my_fmodl(
@@ -1947,11 +1947,11 @@ long double fmodl(long double, long double);
float call_fmodf(float x, float y) {
return fmodf(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmodf
- // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_fmodf
+ // CIR: cir.fmod %{{.+}}, %{{.+}} : !cir.float
// LLVM: define dso_local float @call_fmodf
- // LLVM: %{{.+}} = frem float %{{.+}}, %{{.+}}
+ // LLVM: frem float %{{.+}}, %{{.+}}
// LLVM: }
// OGCG: define{{.*}}@call_fmodf(
@@ -1960,11 +1960,11 @@ float call_fmodf(float x, float y) {
double call_fmod(double x, double y) {
return fmod(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmod
- // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_fmod
+ // CIR: cir.fmod %{{.+}}, %{{.+}} : !cir.double
// LLVM: define dso_local double @call_fmod
- // LLVM: %{{.+}} = frem double %{{.+}}, %{{.+}}
+ // LLVM: frem double %{{.+}}, %{{.+}}
// LLVM: }
// OGCG: define{{.*}}@call_fmod(
@@ -1973,12 +1973,12 @@ double call_fmod(double x, double y) {
long double call_fmodl(long double x, long double y) {
return fmodl(x, y);
- // CHECK: cir.func no_inline dso_local @call_fmodl
- // CHECK: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+ // CIR: cir.func no_inline dso_local @call_fmodl
+ // CIR: cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: cir.fmod %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_fmodl
- // LLVM: %{{.+}} = frem x86_fp80 %{{.+}}, %{{.+}}
+ // LLVM: frem x86_fp80 %{{.+}}, %{{.+}}
// LLVM: }
// OGCG: define{{.*}}@call_fmodl(
@@ -1989,11 +1989,11 @@ long double call_fmodl(long double x, long double y) {
float my_powf(float x, float y) {
return __builtin_powf(x, y);
- // CHECK: cir.func no_inline dso_local @my_powf
- // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_powf
+ // CIR: cir.pow %{{.+}}, %{{.+}} : !cir.float
// LLVM: define dso_local float @my_powf
- // LLVM: %{{.+}} = call float @llvm.pow.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: call float @llvm.pow.f32(float %{{.+}}, float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_powf(
@@ -2002,11 +2002,11 @@ float my_powf(float x, float y) {
double my_pow(double x, double y) {
return __builtin_pow(x, y);
- // CHECK: cir.func no_inline dso_local @my_pow
- // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_pow
+ // CIR: cir.pow %{{.+}}, %{{.+}} : !cir.double
// LLVM: define dso_local double @my_pow
- // LLVM: %{{.+}} = call double @llvm.pow.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: call double @llvm.pow.f64(double %{{.+}}, double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_pow(
@@ -2015,12 +2015,12 @@ double my_pow(double x, double y) {
long double my_powl(long double x, long double y) {
return __builtin_powl(x, y);
- // CHECK: cir.func no_inline dso_local @my_powl
- // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+ // CIR: cir.func no_inline dso_local @my_powl
+ // CIR: cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @my_powl
- // LLVM: %{{.+}} = call x86_fp80 @llvm.pow.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.pow.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_powl(
@@ -2033,11 +2033,11 @@ long double powl(long double, long double);
float call_powf(float x, float y) {
return powf(x, y);
- // CHECK: cir.func no_inline dso_local @call_powf
- // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @call_powf
+ // CIR: cir.pow %{{.+}}, %{{.+}} : !cir.float
// LLVM: define dso_local float @call_powf
- // LLVM: %{{.+}} = call float @llvm.pow.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: call float @llvm.pow.f32(float %{{.+}}, float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_powf(
@@ -2046,11 +2046,11 @@ float call_powf(float x, float y) {
double call_pow(double x, double y) {
return pow(x, y);
- // CHECK: cir.func no_inline dso_local @call_pow
- // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @call_pow
+ // CIR: cir.pow %{{.+}}, %{{.+}} : !cir.double
// LLVM: define dso_local double @call_pow
- // LLVM: %{{.+}} = call double @llvm.pow.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: call double @llvm.pow.f64(double %{{.+}}, double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_pow(
@@ -2059,12 +2059,12 @@ double call_pow(double x, double y) {
long double call_powl(long double x, long double y) {
return powl(x, y);
- // CHECK: cir.func no_inline dso_local @call_powl
- // CHECK: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
- // AARCH64: %{{.+}} = cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
+ // CIR: cir.func no_inline dso_local @call_powl
+ // CIR: cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.f80>
+ // AARCH64: cir.pow %{{.+}}, %{{.+}} : !cir.long_double<!cir.double>
// LLVM: define dso_local x86_fp80 @call_powl
- // LLVM: %{{.+}} = call x86_fp80 @llvm.pow.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
+ // LLVM: call x86_fp80 @llvm.pow.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@call_powl(
@@ -2075,11 +2075,11 @@ long double call_powl(long double x, long double y) {
float my_acosf(float x) {
return __builtin_acosf(x);
- // CHECK: cir.func no_inline dso_local @my_acosf
- // CHECK: %{{.+}} = cir.acos %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_acosf
+ // CIR: cir.acos %{{.+}} : !cir.float
// LLVM: define dso_local float @my_acosf
- // LLVM: %{{.+}} = call float @llvm.acos.f32(float %{{.+}})
+ // LLVM: call float @llvm.acos.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_acosf(
@@ -2088,11 +2088,11 @@ float my_acosf(float x) {
double my_acos(double x) {
return __builtin_acos(x);
- // CHECK: cir.func no_inline dso_local @my_acos
- // CHECK: %{{.+}} = cir.acos %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_acos
+ // CIR: cir.acos %{{.+}} : !cir.double
// LLVM: define dso_local double @my_acos
- // LLVM: %{{.+}} = call double @llvm.acos.f64(double %{{.+}})
+ // LLVM: call double @llvm.acos.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_acos(
@@ -2103,11 +2103,11 @@ double my_acos(double x) {
float my_asinf(float x) {
return __builtin_asinf(x);
- // CHECK: cir.func no_inline dso_local @my_asinf
- // CHECK: %{{.+}} = cir.asin %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_asinf
+ // CIR: cir.asin %{{.+}} : !cir.float
// LLVM: define dso_local float @my_asinf
- // LLVM: %{{.+}} = call float @llvm.asin.f32(float %{{.+}})
+ // LLVM: call float @llvm.asin.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_asinf(
@@ -2116,11 +2116,11 @@ float my_asinf(float x) {
double my_asin(double x) {
return __builtin_asin(x);
- // CHECK: cir.func no_inline dso_local @my_asin
- // CHECK: %{{.+}} = cir.asin %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_asin
+ // CIR: cir.asin %{{.+}} : !cir.double
// LLVM: define dso_local double @my_asin
- // LLVM: %{{.+}} = call double @llvm.asin.f64(double %{{.+}})
+ // LLVM: call double @llvm.asin.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_asin(
@@ -2131,11 +2131,11 @@ double my_asin(double x) {
float my_atanf(float x) {
return __builtin_atanf(x);
- // CHECK: cir.func no_inline dso_local @my_atanf
- // CHECK: %{{.+}} = cir.atan %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_atanf
+ // CIR: cir.atan %{{.+}} : !cir.float
// LLVM: define dso_local float @my_atanf
- // LLVM: %{{.+}} = call float @llvm.atan.f32(float %{{.+}})
+ // LLVM: call float @llvm.atan.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_atanf(
@@ -2144,11 +2144,11 @@ float my_atanf(float x) {
double my_atan(double x) {
return __builtin_atan(x);
- // CHECK: cir.func no_inline dso_local @my_atan
- // CHECK: %{{.+}} = cir.atan %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_atan
+ // CIR: cir.atan %{{.+}} : !cir.double
// LLVM: define dso_local double @my_atan
- // LLVM: %{{.+}} = call double @llvm.atan.f64(double %{{.+}})
+ // LLVM: call double @llvm.atan.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_atan(
@@ -2159,11 +2159,11 @@ double my_atan(double x) {
float my_atan2f(float y, float x) {
return __builtin_atan2f(y, x);
- // CHECK: cir.func no_inline dso_local @my_atan2f
- // CHECK: %{{.+}} = cir.atan2 %{{.+}}, %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_atan2f
+ // CIR: cir.atan2 %{{.+}}, %{{.+}} : !cir.float
// LLVM: define dso_local float @my_atan2f
- // LLVM: %{{.+}} = call float @llvm.atan2.f32(float %{{.+}}, float %{{.+}})
+ // LLVM: call float @llvm.atan2.f32(float %{{.+}}, float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_atan2f(
@@ -2172,11 +2172,11 @@ float my_atan2f(float y, float x) {
double my_atan2(double y, double x) {
return __builtin_atan2(y, x);
- // CHECK: cir.func no_inline dso_local @my_atan2
- // CHECK: %{{.+}} = cir.atan2 %{{.+}}, %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_atan2
+ // CIR: cir.atan2 %{{.+}}, %{{.+}} : !cir.double
// LLVM: define dso_local double @my_atan2
- // LLVM: %{{.+}} = call double @llvm.atan2.f64(double %{{.+}}, double %{{.+}})
+ // LLVM: call double @llvm.atan2.f64(double %{{.+}}, double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_atan2(
@@ -2187,11 +2187,11 @@ double my_atan2(double y, double x) {
float my_roundevenf(float x) {
return __builtin_roundevenf(x);
- // CHECK: cir.func no_inline dso_local @my_roundevenf
- // CHECK: %{{.+}} = cir.roundeven %{{.+}} : !cir.float
+ // CIR: cir.func no_inline dso_local @my_roundevenf
+ // CIR: cir.roundeven %{{.+}} : !cir.float
// LLVM: define dso_local float @my_roundevenf
- // LLVM: %{{.+}} = call float @llvm.roundeven.f32(float %{{.+}})
+ // LLVM: call float @llvm.roundeven.f32(float %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_roundevenf(
@@ -2200,11 +2200,11 @@ float my_roundevenf(float x) {
double my_roundeven(double x) {
return __builtin_roundeven(x);
- // CHECK: cir.func no_inline dso_local @my_roundeven
- // CHECK: %{{.+}} = cir.roundeven %{{.+}} : !cir.double
+ // CIR: cir.func no_inline dso_local @my_roundeven
+ // CIR: cir.roundeven %{{.+}} : !cir.double
// LLVM: define dso_local double @my_roundeven
- // LLVM: %{{.+}} = call double @llvm.roundeven.f64(double %{{.+}})
+ // LLVM: call double @llvm.roundeven.f64(double %{{.+}})
// LLVM: }
// OGCG: define{{.*}}@my_roundeven(
More information about the cfe-commits
mailing list