Author: Jianjian Guan Date: 2026-05-08T14:18:33+08:00 New Revision: 72860cddbf575522bc686c9bed63addfa86f1071
URL: https://github.com/llvm/llvm-project/commit/72860cddbf575522bc686c9bed63addfa86f1071 DIFF: https://github.com/llvm/llvm-project/commit/72860cddbf575522bc686c9bed63addfa86f1071.diff LOG: [CIR][NFC] Merge duplicate checks in CodeGenBuiltins tests (#196224) Added: Modified: clang/test/CIR/CodeGenBuiltins/builtin-memchr.c clang/test/CIR/CodeGenBuiltins/builtin-object-size.cpp clang/test/CIR/CodeGenBuiltins/builtin-signbit.c clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c clang/test/CIR/CodeGenBuiltins/builtins-overflow.cpp clang/test/CIR/CodeGenBuiltins/builtins-pred-info.c clang/test/CIR/CodeGenBuiltins/builtins.cpp Removed: ################################################################################ diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-memchr.c b/clang/test/CIR/CodeGenBuiltins/builtin-memchr.c index 0f6a6261d2a0d..5380dbc371de1 100644 --- a/clang/test/CIR/CodeGenBuiltins/builtin-memchr.c +++ b/clang/test/CIR/CodeGenBuiltins/builtin-memchr.c @@ -3,7 +3,7 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll // RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll -// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s +// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s void *test_char_memchr(const char arg[32]) { return __builtin_char_memchr(arg, 123, 32); @@ -18,9 +18,6 @@ void *test_char_memchr(const char arg[32]) { // LLVM: call ptr @memchr(ptr noundef %{{.*}}, i32 noundef 123, i64 noundef 32) // LLVM: ret ptr -// OGCG-LABEL: @test_char_memchr -// OGCG: call ptr @memchr(ptr noundef %{{.*}}, i32 noundef 123, i64 noundef 32) -// OGCG: ret ptr void *test_memchr(const void *ptr, int val, unsigned long size) { return __builtin_memchr(ptr, val, size); @@ -33,6 +30,3 @@ void *test_memchr(const void *ptr, int val, unsigned long size) { // LLVM: call ptr @memchr(ptr noundef %{{.*}}, i32 noundef %{{.*}}, i64 noundef %{{.*}}) // LLVM: ret ptr -// OGCG-LABEL: @test_memchr -// OGCG: call ptr @memchr(ptr noundef %{{.*}}, i32 noundef %{{.*}}, i64 noundef %{{.*}}) -// OGCG: ret ptr diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-object-size.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-object-size.cpp index b60e24594388d..341fddc089e47 100644 --- a/clang/test/CIR/CodeGenBuiltins/builtin-object-size.cpp +++ b/clang/test/CIR/CodeGenBuiltins/builtin-object-size.cpp @@ -3,7 +3,7 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll // RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll -// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG +// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM // C++-specific tests for __builtin_object_size @@ -11,7 +11,6 @@ int gi; // CIR-LABEL: @_Z5test1v // LLVM-LABEL: define{{.*}} void @_Z5test1v() -// OGCG-LABEL: define{{.*}} void @_Z5test1v() void test1() { // Guaranteeing that our cast removal logic doesn't break more interesting // cases. @@ -23,34 +22,27 @@ void test1() { // CIR: cir.const #cir.int<8> // LLVM: store i32 8 - // OGCG: store i32 8 gi = __builtin_object_size(&c, 0); // CIR: cir.const #cir.int<8> // LLVM: store i32 8 - // OGCG: store i32 8 gi = __builtin_object_size((A*)&c, 0); // CIR: cir.const #cir.int<4> // LLVM: store i32 4 - // OGCG: store i32 4 gi = __builtin_object_size((B*)&c, 0); // CIR: cir.const #cir.int<8> // LLVM: store i32 8 - // OGCG: store i32 8 gi = __builtin_object_size((char*)&c, 0); // CIR: cir.const #cir.int<8> // LLVM: store i32 8 - // OGCG: store i32 8 gi = __builtin_object_size((char*)(A*)&c, 0); // CIR: cir.const #cir.int<4> // LLVM: store i32 4 - // OGCG: store i32 4 gi = __builtin_object_size((char*)(B*)&c, 0); } // CIR-LABEL: @_Z5test2v() // LLVM-LABEL: define{{.*}} void @_Z5test2v() -// OGCG-LABEL: define{{.*}} void @_Z5test2v() void test2() { struct A { char buf[16]; }; struct B : A {}; @@ -58,19 +50,15 @@ void test2() { // CIR: cir.objsize max nullunknown %{{.+}} : !cir.ptr<!void> -> !u64i // LLVM: call i64 @llvm.objectsize.i64.p0(ptr %{{.*}}, i1 false, i1 true, i1 false) - // OGCG: call i64 @llvm.objectsize.i64.p0(ptr %{{.*}}, i1 false, i1 true, i1 false) gi = __builtin_object_size(&c->bs[0], 0); // CIR: cir.objsize max nullunknown %{{.+}} : !cir.ptr<!void> -> !u64i // LLVM: call i64 @llvm.objectsize.i64.p0(ptr %{{.*}}, i1 false, i1 true, i1 false) - // OGCG: call i64 @llvm.objectsize.i64.p0(ptr %{{.*}}, i1 false, i1 true, i1 false) gi = __builtin_object_size(&c->bs[0], 1); // CIR: cir.objsize min nullunknown %{{.+}} : !cir.ptr<!void> -> !u64i // LLVM: call i64 @llvm.objectsize.i64.p0(ptr %{{.*}}, i1 true, i1 true, i1 false) - // OGCG: call i64 @llvm.objectsize.i64.p0(ptr %{{.*}}, i1 true, i1 true, i1 false) gi = __builtin_object_size(&c->bs[0], 2); // CIR: cir.const #cir.int<16> // LLVM: store i32 16 - // OGCG: store i32 16 gi = __builtin_object_size(&c->bs[0], 3); // NYI: DerivedToBase cast @@ -78,7 +66,6 @@ void test2() { // CIR: cir.const #cir.int<16> // LLVM: store i32 16 - // OGCG: store i32 16 gi = __builtin_object_size((A*)&c->bs[0], 1); // NYI: DerivedToBase cast @@ -86,23 +73,18 @@ void test2() { // CIR: cir.const #cir.int<16> // LLVM: store i32 16 - // OGCG: store i32 16 gi = __builtin_object_size((A*)&c->bs[0], 3); // CIR: cir.objsize max nullunknown %{{.+}} : !cir.ptr<!void> -> !u64i // LLVM: call i64 @llvm.objectsize.i64.p0(ptr %{{.*}}, i1 false, i1 true, i1 false) - // OGCG: call i64 @llvm.objectsize.i64.p0(ptr %{{.*}}, i1 false, i1 true, i1 false) gi = __builtin_object_size(&c->bs[0].buf[0], 0); // CIR: cir.const #cir.int<16> // LLVM: store i32 16 - // OGCG: store i32 16 gi = __builtin_object_size(&c->bs[0].buf[0], 1); // CIR: cir.objsize min nullunknown %{{.+}} : !cir.ptr<!void> -> !u64i // LLVM: call i64 @llvm.objectsize.i64.p0(ptr %{{.*}}, i1 true, i1 true, i1 false) - // OGCG: call i64 @llvm.objectsize.i64.p0(ptr %{{.*}}, i1 true, i1 true, i1 false) gi = __builtin_object_size(&c->bs[0].buf[0], 2); // CIR: cir.const #cir.int<16> // LLVM: store i32 16 - // OGCG: store i32 16 gi = __builtin_object_size(&c->bs[0].buf[0], 3); } diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-signbit.c b/clang/test/CIR/CodeGenBuiltins/builtin-signbit.c index ae4f96c445658..e3ce1440ca595 100644 --- a/clang/test/CIR/CodeGenBuiltins/builtin-signbit.c +++ b/clang/test/CIR/CodeGenBuiltins/builtin-signbit.c @@ -3,7 +3,7 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll // RUN: FileCheck %s --check-prefix=LLVM --input-file %t-cir.ll // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll -// RUN: FileCheck %s --check-prefix=OGCG --input-file %t.ll +// RUN: FileCheck %s --check-prefix=LLVM --input-file %t.ll void test_signbit_positive_zero(){ double positiveZero = +0.0; @@ -17,11 +17,6 @@ void test_signbit_positive_zero(){ // LLVM: bitcast double %{{.*}} to i64 // LLVM: icmp slt i64 %{{.*}}, 0 // LLVM: zext i1 %{{.*}} to i32 - -// OGCG: store double 0.000000e+00, ptr %{{.*}} -// OGCG: bitcast double %{{.*}} to i64 -// OGCG: icmp slt i64 %{{.*}}, 0 -// OGCG: zext i1 %{{.*}} to i32 } void test_signbit_negative_zero(){ @@ -36,11 +31,6 @@ void test_signbit_negative_zero(){ // LLVM: bitcast double %{{.*}} to i64 // LLVM: icmp slt i64 %{{.*}}, 0 // LLVM: zext i1 %{{.*}} to i32 - -// OGCG: store double -0.000000e+00, ptr %{{.*}} -// OGCG: bitcast double %{{.*}} to i64 -// OGCG: icmp slt i64 %{{.*}}, 0 -// OGCG: zext i1 %{{.*}} to i32 } void test_signbit_positive_number(){ @@ -55,11 +45,6 @@ void test_signbit_positive_number(){ // LLVM: bitcast double %{{.*}} to i64 // LLVM: icmp slt i64 %{{.*}}, 0 // LLVM: zext i1 %{{.*}} to i32 - -// OGCG: store double 1.000000e+00, ptr %{{.*}} -// OGCG: bitcast double %{{.*}} to i64 -// OGCG: icmp slt i64 %{{.*}}, 0 -// OGCG: zext i1 %{{.*}} to i32 } void test_signbit_negative_number(){ @@ -74,11 +59,6 @@ void test_signbit_negative_number(){ // LLVM: bitcast double %{{.*}} to i64 // LLVM: icmp slt i64 %{{.*}}, 0 // LLVM: zext i1 %{{.*}} to i32 - -// OGCG: store double -1.000000e+00, ptr %{{.*}} -// OGCG: bitcast double %{{.*}} to i64 -// OGCG: icmp slt i64 %{{.*}}, 0 -// OGCG: zext i1 %{{.*}} to i32 } void test_signbit_positive_nan(){ @@ -93,11 +73,6 @@ void test_signbit_positive_nan(){ // LLVM: bitcast double %{{.*}} to i64 // LLVM: icmp slt i64 %{{.*}}, 0 // LLVM: zext i1 %{{.*}} to i32 - -// OGCG: store double +qnan, ptr %{{.*}} -// OGCG: bitcast double %{{.*}} to i64 -// OGCG: icmp slt i64 %{{.*}}, 0 -// OGCG: zext i1 %{{.*}} to i32 } void test_signbit_negative_nan(){ @@ -112,11 +87,6 @@ void test_signbit_negative_nan(){ // LLVM: bitcast double %{{.*}} to i64 // LLVM: icmp slt i64 %{{.*}}, 0 // LLVM: zext i1 %{{.*}} to i32 - -// OGCG: store double -qnan, ptr %{{.*}} -// OGCG: bitcast double %{{.*}} to i64 -// OGCG: icmp slt i64 %{{.*}}, 0 -// OGCG: zext i1 %{{.*}} to i32 } void test_signbit_positive_infinity(){ @@ -131,11 +101,6 @@ void test_signbit_positive_infinity(){ // LLVM: bitcast double %{{.*}} to i64 // LLVM: icmp slt i64 %{{.*}}, 0 // LLVM: zext i1 %{{.*}} to i32 - -// OGCG: store double +inf, ptr %{{.*}} -// OGCG: bitcast double %{{.*}} to i64 -// OGCG: icmp slt i64 %{{.*}}, 0 -// OGCG: zext i1 %{{.*}} to i32 } void test_signbit_negative_infinity(){ @@ -150,9 +115,4 @@ void test_signbit_negative_infinity(){ // LLVM: bitcast double %{{.*}} to i64 // LLVM: icmp slt i64 %{{.*}}, 0 // LLVM: zext i1 %{{.*}} to i32 - -// OGCG: store double -inf, ptr %{{.*}} -// OGCG: bitcast double %{{.*}} to i64 -// OGCG: icmp slt i64 %{{.*}}, 0 -// OGCG: zext i1 %{{.*}} to i32 } diff --git a/clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c b/clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c index dcdbf197acfbc..c04739d737632 100644 --- a/clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c +++ b/clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c @@ -4,7 +4,7 @@ // 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 +// RUN: FileCheck --check-prefix=LLVM --input-file=%t-ogcg.ll %s typedef int vint4 __attribute__((ext_vector_type(4))); typedef short vshort8 __attribute__((ext_vector_type(8))); @@ -15,36 +15,29 @@ 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); } @@ -52,26 +45,21 @@ 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); } @@ -79,26 +67,21 @@ 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); } @@ -106,26 +89,21 @@ 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); } @@ -133,26 +111,21 @@ 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); } @@ -160,26 +133,21 @@ 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); } @@ -187,26 +155,21 @@ 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); } @@ -214,26 +177,21 @@ 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); } @@ -241,26 +199,21 @@ 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); } @@ -268,26 +221,21 @@ 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); } @@ -295,26 +243,21 @@ 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); } @@ -322,26 +265,21 @@ 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); } @@ -349,26 +287,21 @@ 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); } @@ -376,26 +309,21 @@ 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); } @@ -403,26 +331,21 @@ 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); } @@ -430,26 +353,21 @@ 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); } @@ -457,26 +375,21 @@ 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); } @@ -484,26 +397,21 @@ 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); } @@ -511,26 +419,21 @@ 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); } @@ -545,36 +448,29 @@ void test_builtin_elementwise_fshl(long long int i1, long long int i2, vint4 vu2, vint4 vu3) { // CIR-LABEL: test_builtin_elementwise_fshl // 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 %{{.*}}) 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 %{{.*}}) 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 %{{.*}}) 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 %{{.*}}) 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> %{{.*}}) 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> %{{.*}}) vu1 = __builtin_elementwise_fshl(vu1, vu2, vu3); } @@ -588,35 +484,28 @@ void test_builtin_elementwise_fshr(long long int i1, long long int i2, vint4 vu2, vint4 vu3) { // CIR-LABEL: test_builtin_elementwise_fshr // 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 %{{.*}}) 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 %{{.*}}) 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 %{{.*}}) 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 %{{.*}}) 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> %{{.*}}) 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> %{{.*}}) vu1 = __builtin_elementwise_fshr(vu1, vu2, vu3); } diff --git a/clang/test/CIR/CodeGenBuiltins/builtins-overflow.cpp b/clang/test/CIR/CodeGenBuiltins/builtins-overflow.cpp index 8089a538d733b..46eb19232834c 100644 --- a/clang/test/CIR/CodeGenBuiltins/builtins-overflow.cpp +++ b/clang/test/CIR/CodeGenBuiltins/builtins-overflow.cpp @@ -3,7 +3,7 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll // RUN: FileCheck %s --check-prefix=LLVM --input-file=%t-cir.ll // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll -// RUN: FileCheck %s --check-prefix=OGCG --input-file=%t.ll +// RUN: FileCheck %s --check-prefix=LLVM --input-file=%t.ll bool test_add_overflow_uint_uint_uint(unsigned x, unsigned y, unsigned *res) { return __builtin_add_overflow(x, y, res); @@ -20,8 +20,6 @@ bool test_add_overflow_uint_uint_uint(unsigned x, unsigned y, unsigned *res) { // LLVM: define{{.*}} i1 @_Z32test_add_overflow_uint_uint_uintjjPj(i32{{.*}}, i32{{.*}}, ptr{{.*}}) // LLVM: call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %{{.+}}, i32 %{{.+}}) -// OGCG: define{{.*}} i1 @_Z32test_add_overflow_uint_uint_uintjjPj(i32{{.*}}, i32{{.*}}, ptr{{.*}}) -// OGCG: call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %{{.+}}, i32 %{{.+}}) bool test_add_overflow_int_int_int(int x, int y, int *res) { return __builtin_add_overflow(x, y, res); diff --git a/clang/test/CIR/CodeGenBuiltins/builtins-pred-info.c b/clang/test/CIR/CodeGenBuiltins/builtins-pred-info.c index 09e6b9013aee7..acd09de00bd46 100644 --- a/clang/test/CIR/CodeGenBuiltins/builtins-pred-info.c +++ b/clang/test/CIR/CodeGenBuiltins/builtins-pred-info.c @@ -6,7 +6,7 @@ // CIR-O0-NOT: cir.expect // RUN: %clang_cc1 -O2 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s --check-prefix=CIR-O2 // RUN: %clang_cc1 -O2 -disable-llvm-passes -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o - | FileCheck %s --check-prefix=LLVM -// RUN: %clang_cc1 -O2 -disable-llvm-passes -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=OGCG +// RUN: %clang_cc1 -O2 -disable-llvm-passes -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LLVM extern void __attribute__((noinline)) bar(void); @@ -29,10 +29,6 @@ void expect(int x) { // LLVM: [[THEN]]: // LLVM: call void @bar() -// OGCG-LABEL: @expect -// OGCG: br i1 {{.*}}, label %[[THEN:.*]], label %[[END:.*]] -// OGCG: [[THEN]]: -// OGCG: call void @bar() void expect_with_probability(int x) { if (__builtin_expect_with_probability(x, 1, 0.8)) @@ -53,10 +49,6 @@ void expect_with_probability(int x) { // LLVM: [[THEN]]: // LLVM: call void @bar() -// OGCG-LABEL: @expect_with_probability -// OGCG: br i1 {{.*}}, label %[[THEN:.*]], label %[[END:.*]] -// OGCG: [[THEN]]: -// OGCG: call void @bar() void unpredictable(int x) { if (__builtin_unpredictable(x > 1)) @@ -71,7 +63,3 @@ void unpredictable(int x) { // LLVM: [[THEN]]: // LLVM: call void @bar() -// OGCG-LABEL: @unpredictable -// OGCG: br i1 {{.*}}, label %[[THEN:.*]], label %[[END:.*]] -// OGCG: [[THEN]]: -// OGCG: call void @bar() diff --git a/clang/test/CIR/CodeGenBuiltins/builtins.cpp b/clang/test/CIR/CodeGenBuiltins/builtins.cpp index f114a691bee94..920f0696dba2d 100644 --- a/clang/test/CIR/CodeGenBuiltins/builtins.cpp +++ b/clang/test/CIR/CodeGenBuiltins/builtins.cpp @@ -3,7 +3,7 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -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 x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll -// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG +// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM double fabs(double x) { return __builtin_fabs(x); @@ -11,7 +11,6 @@ double fabs(double x) { // CIR: {{.*}} = cir.fabs {{.*}} : !cir.double // LLVM: {{.*}} = call double @llvm.fabs.f64(double {{.*}}) -// OGCG: {{.*}} = call double @llvm.fabs.f64(double {{.*}}) extern "C" void *test_return_address(void) { return __builtin_return_address(1); @@ -23,8 +22,6 @@ extern "C" void *test_return_address(void) { // LLVM-LABEL: @test_return_address // LLVM: {{%.*}} = call ptr @llvm.returnaddress.p0(i32 1) - // OGCG-LABEL: @test_return_address - // OGCG: {{%.*}} = call ptr @llvm.returnaddress.p0(i32 1) } extern "C" void *test_frame_address(void) { @@ -38,6 +35,4 @@ extern "C" void *test_frame_address(void) { // LLVM-LABEL: @test_frame_address // LLVM: {{%.*}} = call ptr @llvm.frameaddress.p0(i32 1) - // OGCG-LABEL: @test_frame_address - // OGCG: {{%.*}} = call ptr @llvm.frameaddress.p0(i32 1) } _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
