diff options
| author | Amir Ayupov <aaupov@fb.com> | 2025-06-08 22:50:59 -0700 |
|---|---|---|
| committer | Amir Ayupov <aaupov@fb.com> | 2025-06-08 22:50:59 -0700 |
| commit | eb1dd48b4ab79e29e82bd396c01b4a7cc83bbd81 (patch) | |
| tree | ad446efb8062977bcf328af58cdc7fcd47864af2 /clang/test/CIR/CodeGen/complex.cpp | |
| parent | 81f92265327a8cf6e730ad1d01fd02f4ef76ed86 (diff) | |
| parent | 03bbd04bb7ae40dcda7b8bf1d6d09f63191503b0 (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/aaupov/spr/main.boltnfci-simplify-dataaggregator-using-traces-1
Created using spr 1.3.4
[skip ci]
Diffstat (limited to 'clang/test/CIR/CodeGen/complex.cpp')
| -rw-r--r-- | clang/test/CIR/CodeGen/complex.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/clang/test/CIR/CodeGen/complex.cpp b/clang/test/CIR/CodeGen/complex.cpp new file mode 100644 index 000000000000..6fa7bca3749c --- /dev/null +++ b/clang/test/CIR/CodeGen/complex.cpp @@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// 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 + +int _Complex ci; + +float _Complex cf; + +int _Complex ci2 = { 1, 2 }; + +float _Complex cf2 = { 1.0f, 2.0f }; + +// CIR: cir.global external @ci = #cir.zero : !cir.complex<!s32i> +// CIR: cir.global external @cf = #cir.zero : !cir.complex<!cir.float> +// CIR: cir.global external @ci2 = #cir.const_complex<#cir.int<1> : !s32i, #cir.int<2> : !s32i> : !cir.complex<!s32i> +// CIR: cir.global external @cf2 = #cir.const_complex<#cir.fp<1.000000e+00> : !cir.float, #cir.fp<2.000000e+00> : !cir.float> : !cir.complex<!cir.float> + +// LLVM: {{.*}} = global { i32, i32 } zeroinitializer, align 4 +// LLVM: {{.*}} = global { float, float } zeroinitializer, align 4 +// LLVM: {{.*}} = global { i32, i32 } { i32 1, i32 2 }, align 4 +// LLVM: {{.*}} = global { float, float } { float 1.000000e+00, float 2.000000e+00 }, align 4 + +// OGCG: {{.*}} = global { i32, i32 } zeroinitializer, align 4 +// OGCG: {{.*}} = global { float, float } zeroinitializer, align 4 +// OGCG: {{.*}} = global { i32, i32 } { i32 1, i32 2 }, align 4 +// OGCG: {{.*}} = global { float, float } { float 1.000000e+00, float 2.000000e+00 }, align 4 |
