1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -verify-machineinstrs -stop-before=ppc-vsx-copy -vec-extabi \
3 ; RUN: -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff < %s | \
6 ;; Fixed vector arguments to variadic functions are passed differently than
7 ;; either arguments to non-variadic functions or arguments passed through
9 define double @callee(i32 %count, <4 x i32> %vsi, double %next, ...) {
10 ; CHECK-LABEL: name: callee
12 ; CHECK: LIFETIME_START %stack.0.arg_list
13 ; CHECK: [[ADDI:%[0-9]+]]:gprc = ADDI %fixed-stack.0, 0
14 ; CHECK: STW killed [[ADDI]], 0, %stack.0.arg_list :: (store (s32) into %ir.arg_list)
15 ; CHECK: [[ADDI1:%[0-9]+]]:gprc = ADDI %fixed-stack.0, 15
16 ; CHECK: [[RLWINM:%[0-9]+]]:gprc_and_gprc_nor0 = RLWINM killed [[ADDI1]], 0, 0, 27
17 ; CHECK: [[LFD:%[0-9]+]]:f8rc = LFD 16, killed [[RLWINM]] :: (load (s64) from %ir.argp.next, align 16)
18 ; CHECK: LIFETIME_END %stack.0.arg_list
19 ; CHECK: $f1 = COPY [[LFD]]
20 ; CHECK: BLR implicit $lr, implicit $rm, implicit $f1
22 %arg_list = alloca ptr, align 4
23 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %arg_list)
24 call void @llvm.va_start(ptr nonnull %arg_list)
25 %argp.cur = load ptr, ptr %arg_list, align 4
26 %0 = ptrtoint ptr %argp.cur to i32
29 %argp.cur.aligned = inttoptr i32 %2 to ptr
30 %argp.next = getelementptr inbounds i8, ptr %argp.cur.aligned, i32 16
31 %argp.next3 = getelementptr inbounds i8, ptr %argp.cur.aligned, i32 24
32 store ptr %argp.next3, ptr %arg_list, align 4
33 %3 = load double, ptr %argp.next, align 16
34 call void @llvm.va_end(ptr nonnull %arg_list)
35 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %arg_list)
39 declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture)
41 declare void @llvm.va_start(ptr)
43 declare void @llvm.va_end(ptr)
45 declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture)