Skip to content

Commit 7c21024

Browse files
committed
[CIR] Update and UnXFAIL clang/test/CIR/CodeGen/abstract-cond.c
1 parent 26c4b1e commit 7c21024

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

clang/test/CIR/CodeGen/abstract-cond.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// XFAIL: *
21
// RUN: %clang_cc1 -triple aarch64-none-linux-android21 -fclangir -emit-cir %s -o %t.cir
32
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
43
// RUN: %clang_cc1 -triple aarch64-none-linux-android21 -fclangir -emit-llvm -fno-clangir-call-conv-lowering %s -o %t.ll
@@ -14,15 +13,16 @@ int f6(int a0, struct s6 a1, struct s6 a2) {
1413
// CIR: %[[A0:.*]] = cir.alloca !s32i, !cir.ptr<!s32i>, ["a0"
1514
// CIR: %[[A1:.*]] = cir.alloca !rec_s6, !cir.ptr<!rec_s6>, ["a1"
1615
// CIR: %[[A2:.*]] = cir.alloca !rec_s6, !cir.ptr<!rec_s6>, ["a2"
17-
// CIR: %[[TMP:.*]] = cir.alloca !rec_s6, !cir.ptr<!rec_s6>, ["tmp"] {alignment = 4 : i64}
18-
// CIR: %[[LOAD_A0:.*]] = cir.load{{.*}} %[[A0]] : !cir.ptr<!s32i>, !s32i
19-
// CIR: %[[COND:.*]] = cir.cast(int_to_bool, %[[LOAD_A0]] : !s32i), !cir.bool
20-
// CIR: cir.if %[[COND]] {
21-
// CIR: cir.copy %[[A1]] to %[[TMP]] : !cir.ptr<!rec_s6>
22-
// CIR: } else {
23-
// CIR: cir.copy %[[A2]] to %[[TMP]] : !cir.ptr<!rec_s6>
24-
// CIR: }
25-
// CIR: cir.get_member %[[TMP]][0] {name = "f0"} : !cir.ptr<!rec_s6> -> !cir.ptr<!s32i>
16+
// CIR: cir.scope {
17+
// CIR: %[[TMP:.*]] = cir.alloca !rec_s6, !cir.ptr<!rec_s6>, ["ref.tmp0"]
18+
// CIR: %[[LOAD_A0:.*]] = cir.load{{.*}} %[[A0]] : !cir.ptr<!s32i>, !s32i
19+
// CIR: %[[COND:.*]] = cir.cast(int_to_bool, %[[LOAD_A0]] : !s32i), !cir.bool
20+
// CIR: cir.if %[[COND]] {
21+
// CIR: cir.copy %[[A1]] to %[[TMP]] : !cir.ptr<!rec_s6>
22+
// CIR: } else {
23+
// CIR: cir.copy %[[A2]] to %[[TMP]] : !cir.ptr<!rec_s6>
24+
// CIR: }
25+
// CIR: cir.get_member %[[TMP]][0] {name = "f0"} : !cir.ptr<!rec_s6> -> !cir.ptr<!s32i>
2626

2727
// LLVM-LABEL: @f6
2828
// LLVM: %[[LOAD_A0:.*]] = load i32, ptr {{.*}}

0 commit comments

Comments
 (0)