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 powerpc64-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 signext %count, <4 x i32> %vsi, double %next, ...) {
10 ; CHECK-LABEL: name: callee
12 ; CHECK: liveins: $x8, $x9, $x10
13 ; CHECK: [[COPY:%[0-9]+]]:g8rc = COPY $x10
14 ; CHECK: [[COPY1:%[0-9]+]]:g8rc = COPY $x9
15 ; CHECK: [[COPY2:%[0-9]+]]:g8rc = COPY $x8
16 ; CHECK: STD [[COPY2]], 0, %fixed-stack.0 :: (store (s64) into %fixed-stack.0)
17 ; CHECK: STD [[COPY1]], 8, %fixed-stack.0 :: (store (s64) into %fixed-stack.0 + 8)
18 ; CHECK: STD [[COPY]], 16, %fixed-stack.0 :: (store (s64))
19 ; CHECK: LIFETIME_START %stack.0.arg_list
20 ; CHECK: [[ADDI8_:%[0-9]+]]:g8rc = ADDI8 %fixed-stack.0, 0
21 ; CHECK: STD killed [[ADDI8_]], 0, %stack.0.arg_list :: (store (s64) into %ir.0)
22 ; CHECK: [[ADDI8_1:%[0-9]+]]:g8rc = ADDI8 %fixed-stack.0, 15
23 ; CHECK: [[RLDICR:%[0-9]+]]:g8rc_and_g8rc_nox0 = RLDICR killed [[ADDI8_1]], 0, 59
24 ; CHECK: [[LFD:%[0-9]+]]:f8rc = LFD 16, killed [[RLDICR]] :: (load (s64) from %ir.4, align 16)
25 ; CHECK: LIFETIME_END %stack.0.arg_list
26 ; CHECK: $f1 = COPY [[LFD]]
27 ; CHECK: BLR8 implicit $lr8, implicit $rm, implicit $f1
29 %arg_list = alloca i8*, align 8
30 %0 = bitcast i8** %arg_list to i8*
31 call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %0)
32 call void @llvm.va_start(i8* nonnull %0)
33 %argp.cur = load i8*, i8** %arg_list, align 8
34 %1 = ptrtoint i8* %argp.cur to i64
37 %argp.cur.aligned = inttoptr i64 %3 to i8*
38 %argp.next = getelementptr inbounds i8, i8* %argp.cur.aligned, i64 16
39 %argp.next3 = getelementptr inbounds i8, i8* %argp.cur.aligned, i64 24
40 store i8* %argp.next3, i8** %arg_list, align 8
41 %4 = bitcast i8* %argp.next to double*
42 %5 = load double, double* %4, align 16
43 call void @llvm.va_end(i8* nonnull %0)
44 call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %0)
48 declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture)
50 declare void @llvm.va_start(i8*)
52 declare void @llvm.va_end(i8*)
54 declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture)