Skip to content

Commit 6a403cf

Browse files
committed
Add one more comma test case
1 parent 2a9a282 commit 6a403cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clang/test/CIR/CodeGen/comma.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ void comma(void) {
1212
int i;
1313

1414
b = true, c = 65, f = 3.14f, i = 42;
15+
16+
i = 100, 200;
1517
}
1618

1719
// CIR-LABEL: cir.func @comma() {
@@ -28,6 +30,8 @@ void comma(void) {
2830
// CIR: cir.store %[[FLOAT_VAL]], %[[F]] : !cir.float, !cir.ptr<!cir.float>
2931
// CIR: %[[INT_VAL:.*]] = cir.const #cir.int<42> : !s32i
3032
// CIR: cir.store %[[INT_VAL]], %[[I]] : !s32i, !cir.ptr<!s32i>
33+
// CIR: %[[HUNDRED:.*]] = cir.const #cir.int<100> : !s32i
34+
// CIR: cir.store %[[HUNDRED]], %[[I]] : !s32i, !cir.ptr<!s32i>
3135
// CIR: cir.return
3236

3337
// LLVM-LABEL: define {{.*}}void @comma() {
@@ -39,6 +43,7 @@ void comma(void) {
3943
// LLVM: store i8 65, ptr %[[C_PTR]]
4044
// LLVM: store float 0x40091EB860000000, ptr %[[F_PTR]]
4145
// LLVM: store i32 42, ptr %[[I_PTR]]
46+
// LLVM: store i32 100, ptr %[[I_PTR]]
4247
// LLVM: ret void
4348

4449
// OGCG-LABEL: define {{.*}}void @comma()
@@ -50,4 +55,5 @@ void comma(void) {
5055
// OGCG: store i8 65, ptr %[[C_PTR]]
5156
// OGCG: store float 0x40091EB860000000, ptr %[[F_PTR]]
5257
// OGCG: store i32 42, ptr %[[I_PTR]]
58+
// OGCG: store i32 100, ptr %[[I_PTR]]
5359
// OGCG: ret void

0 commit comments

Comments
 (0)