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.0)
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.4, 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 i8*, align 4
23 %0 = bitcast i8** %arg_list to i8*
24 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %0)
25 call void @llvm.va_start(i8* nonnull %0)
26 %argp.cur = load i8*, i8** %arg_list, align 4
27 %1 = ptrtoint i8* %argp.cur to i32
30 %argp.cur.aligned = inttoptr i32 %3 to i8*
31 %argp.next = getelementptr inbounds i8, i8* %argp.cur.aligned, i32 16
32 %argp.next3 = getelementptr inbounds i8, i8* %argp.cur.aligned, i32 24
33 store i8* %argp.next3, i8** %arg_list, align 4
34 %4 = bitcast i8* %argp.next to double*
35 %5 = load double, double* %4, align 16
36 call void @llvm.va_end(i8* nonnull %0)
37 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %0)
41 declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture)
43 declare void @llvm.va_start(i8*)
45 declare void @llvm.va_end(i8*)
47 declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture)