33// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
44// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
55
6- void foo () {
7- int _Complex c = (int _Complex ){1 , 2 };
6+ void foo () {
7+ int _Complex c = (int _Complex ){1 , 2 };
88}
99
1010// CIR: %[[INIT:.*]] = cir.alloca !cir.complex<!s32i>, !cir.ptr<!cir.complex<!s32i>>, ["c", init]
@@ -20,8 +20,8 @@ void foo() {
2020// LLVM: %[[TMP:.*]] = load { i32, i32 }, ptr %[[COMPOUND:.*]], align 4
2121// LLVM: store { i32, i32 } %[[TMP]], ptr %[[INIT]], align 4
2222
23- void foo2 (float a , float b ) {
24- float _Complex c = (float _Complex ){a , b };
23+ void foo2 (float a , float b ) {
24+ float _Complex c = (float _Complex ){a , b };
2525}
2626
2727// CIR: %[[INIT:.*]] = cir.alloca !cir.complex<!cir.float>, !cir.ptr<!cir.complex<!cir.float>>, ["c", init]
@@ -37,7 +37,7 @@ void foo2(float a, float b) {
3737// LLVM: %[[COMPOUND:.*]] = alloca { float, float }, i64 1, align 4
3838// LLVM: %[[A:.*]] = load float, ptr {{.*}}, align 4
3939// LLVM: %[[B:.*]] = load float, ptr {{.*}}, align 4
40- // LLVM: %[[INSERT:.*]] = insertvalue { float, float } undef , float %[[A]], 0
40+ // LLVM: %[[INSERT:.*]] = insertvalue { float, float } {{.*}} , float %[[A]], 0
4141// LLVM: %[[INSERT_2:.*]] = insertvalue { float, float } %[[INSERT]], float %[[B]], 1
4242// LLVM: store { float, float } %[[INSERT_2]], ptr %[[COMPOUND]], align 4
4343// LLVM: %[[TMP:.*]] = load { float, float }, ptr %[[COMPOUND]], align 4
0 commit comments