Skip to content

Commit 0f34360

Browse files
authored
[CIR] Fix var_arg.c test (again) (#154393)
We had competing fixes for this that weren't compatible. This should pass now.
1 parent 4e9dbb5 commit 0f34360

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/test/CIR/CodeGen/var_arg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ void varargs(int count, ...) {
2020
// CIR: %[[COUNT_ADDR:.+]] = cir.alloca !s32i, !cir.ptr<!s32i>, ["count", init]
2121
// CIR: %[[ARGS:.+]] = cir.alloca !cir.array<!rec___va_list_tag x 1>, !cir.ptr<!cir.array<!rec___va_list_tag x 1>>, ["args"]
2222
// CIR: cir.store %[[COUNT]], %[[COUNT_ADDR]] : !s32i, !cir.ptr<!s32i>
23-
// CIR: %[[C12345:.+]] = cir.const #cir.int<12345> : !s32i
2423
// CIR: %[[APTR:.+]] = cir.cast(array_to_ptrdecay, %[[ARGS]] : !cir.ptr<!cir.array<!rec___va_list_tag x 1>>), !cir.ptr<!rec___va_list_tag>
24+
// CIR: %[[C12345:.+]] = cir.const #cir.int<12345> : !s32i
2525
// CIR: cir.va_start %[[APTR]] %[[C12345]] : !cir.ptr<!rec___va_list_tag>, !s32i
2626
// CIR: %[[APTR2:.+]] = cir.cast(array_to_ptrdecay, %[[ARGS]] : !cir.ptr<!cir.array<!rec___va_list_tag x 1>>), !cir.ptr<!rec___va_list_tag>
2727
// CIR: cir.va_end %[[APTR2]] : !cir.ptr<!rec___va_list_tag>
@@ -54,8 +54,8 @@ void stdarg_start(int count, ...) {
5454
// CIR: %[[COUNT2_ADDR:.+]] = cir.alloca !s32i, !cir.ptr<!s32i>, ["count", init]
5555
// CIR: %[[ARGS2:.+]] = cir.alloca !cir.array<!rec___va_list_tag x 1>, !cir.ptr<!cir.array<!rec___va_list_tag x 1>>, ["args"]
5656
// CIR: cir.store %[[COUNT2]], %[[COUNT2_ADDR]] : !s32i, !cir.ptr<!s32i>
57-
// CIR: %[[C12345_2:.+]] = cir.const #cir.int<12345> : !s32i
5857
// CIR: %[[APTR3:.+]] = cir.cast(array_to_ptrdecay, %[[ARGS2]] : !cir.ptr<!cir.array<!rec___va_list_tag x 1>>), !cir.ptr<!rec___va_list_tag>
58+
// CIR: %[[C12345_2:.+]] = cir.const #cir.int<12345> : !s32i
5959
// CIR: cir.va_start %[[APTR3]] %[[C12345_2]] : !cir.ptr<!rec___va_list_tag>, !s32i
6060
// CIR: %[[APTR4:.+]] = cir.cast(array_to_ptrdecay, %[[ARGS2]] : !cir.ptr<!cir.array<!rec___va_list_tag x 1>>), !cir.ptr<!rec___va_list_tag>
6161
// CIR: cir.va_end %[[APTR4]] : !cir.ptr<!rec___va_list_tag>

0 commit comments

Comments
 (0)