@@ -158,13 +158,13 @@ void test_new_with_complex_type() {
158158}
159159
160160// CHECK: cir.func{{.*}} @_Z26test_new_with_complex_typev
161- // CHECK: %0 = cir.alloca !cir.ptr<!cir.complex<!cir.float>>, !cir.ptr<!cir.ptr<!cir.complex<!cir.float>>>, ["a", init]
162- // CHECK: %1 = cir.const #cir.int<8> : !u64i
163- // CHECK: %2 = cir.call @_Znwm(%1 ) : (!u64i) -> !cir.ptr<!void>
164- // CHECK: %3 = cir.cast bitcast %2 : !cir.ptr<!void> -> !cir.ptr<!cir.complex<!cir.float>>
165- // CHECK: %4 = cir.const #cir.const_complex<#cir.fp<1.000000e+00> : !cir.float, #cir.fp<2.000000e+00> : !cir.float> : !cir.complex<!cir.float>
166- // CHECK: cir.store align(8) %4 , %3 : !cir.complex<!cir.float>, !cir.ptr<!cir.complex<!cir.float>>
167- // CHECK: cir.store align(8) %3 , %0 : !cir.ptr<!cir.complex<!cir.float>>, !cir.ptr<!cir.ptr<!cir.complex<!cir.float>>>
161+ // CHECK: %[[A_ADDR:.*]] = cir.alloca !cir.ptr<!cir.complex<!cir.float>>, !cir.ptr<!cir.ptr<!cir.complex<!cir.float>>>, ["a", init]
162+ // CHECK: %[[COMPLEX_SIZE:.*]] = cir.const #cir.int<8> : !u64i
163+ // CHECK: %[[NEW_COMPLEX:.*]] = cir.call @_Znwm(%[[COMPLEX_SIZE]] ) : (!u64i) -> !cir.ptr<!void>
164+ // CHECK: %[[COMPLEX_PTR:.*]] = cir.cast bitcast %[[NEW_COMPLEX]] : !cir.ptr<!void> -> !cir.ptr<!cir.complex<!cir.float>>
165+ // CHECK: %[[COMPLEX_VAL:.*]] = cir.const #cir.const_complex<#cir.fp<1.000000e+00> : !cir.float, #cir.fp<2.000000e+00> : !cir.float> : !cir.complex<!cir.float>
166+ // CHECK: cir.store{{.*}} %[[COMPLEX_VAL]] , %[[COMPLEX_PTR]] : !cir.complex<!cir.float>, !cir.ptr<!cir.complex<!cir.float>>
167+ // CHECK: cir.store{{.*}} %[[COMPLEX_PTR]] , %[[A_ADDR]] : !cir.ptr<!cir.complex<!cir.float>>, !cir.ptr<!cir.ptr<!cir.complex<!cir.float>>>
168168
169169// LLVM: define{{.*}} void @_Z26test_new_with_complex_typev
170170// LLVM: %[[A_ADDR:.*]] = alloca ptr, i64 1, align 8
0 commit comments