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 | \
4; RUN: FileCheck --check-prefix=32BIT %s
5
6; RUN: llc -verify-machineinstrs -stop-before=ppc-vsx-copy -vec-extabi \
7; RUN:     -mcpu=pwr7  -mtriple powerpc64-ibm-aix-xcoff < %s | \
8; RUN: FileCheck --check-prefix=64BIT %s
9
10define void @caller() {
11  ; 32BIT-LABEL: name: caller
12  ; 32BIT: bb.0.entry:
13  ; 32BIT:   ADJCALLSTACKDOWN 88, 0, implicit-def dead $r1, implicit $r1
14  ; 32BIT:   [[LWZtoc:%[0-9]+]]:gprc = LWZtoc %const.0, $r2 :: (load 4 from got)
15  ; 32BIT:   [[LXVW4X:%[0-9]+]]:vsrc = LXVW4X $zero, killed [[LWZtoc]] :: (load 16 from constant-pool)
16  ; 32BIT:   [[LI:%[0-9]+]]:gprc = LI 64
17  ; 32BIT:   STXVW4X killed [[LXVW4X]], $r1, killed [[LI]] :: (store 16)
18  ; 32BIT:   [[LIS:%[0-9]+]]:gprc = LIS 38314
19  ; 32BIT:   [[ORI:%[0-9]+]]:gprc = ORI killed [[LIS]], 63376
20  ; 32BIT:   STW killed [[ORI]], 84, $r1 :: (store 4 into unknown-address + 4, basealign 8)
21  ; 32BIT:   [[LIS1:%[0-9]+]]:gprc = LIS 16389
22  ; 32BIT:   [[ORI1:%[0-9]+]]:gprc = ORI killed [[LIS1]], 48905
23  ; 32BIT:   STW killed [[ORI1]], 80, $r1 :: (store 4, align 8)
24  ; 32BIT:   [[LWZtoc1:%[0-9]+]]:gprc = LWZtoc %const.1, $r2 :: (load 4 from got)
25  ; 32BIT:   [[LXVW4X1:%[0-9]+]]:vsrc = LXVW4X $zero, killed [[LWZtoc1]] :: (load 16 from constant-pool)
26  ; 32BIT:   [[LWZtoc2:%[0-9]+]]:gprc = LWZtoc %const.2, $r2 :: (load 4 from got)
27  ; 32BIT:   [[XFLOADf64_:%[0-9]+]]:vsfrc = XFLOADf64 $zero, killed [[LWZtoc2]] :: (load 8 from constant-pool)
28  ; 32BIT:   [[LIS2:%[0-9]+]]:gprc = LIS 16393
29  ; 32BIT:   [[ORI2:%[0-9]+]]:gprc = ORI killed [[LIS2]], 8697
30  ; 32BIT:   [[LIS3:%[0-9]+]]:gprc = LIS 61467
31  ; 32BIT:   [[ORI3:%[0-9]+]]:gprc = ORI killed [[LIS3]], 34414
32  ; 32BIT:   [[LWZtoc3:%[0-9]+]]:gprc = LWZtoc %const.3, $r2 :: (load 4 from got)
33  ; 32BIT:   [[XFLOADf64_1:%[0-9]+]]:vsfrc = XFLOADf64 $zero, killed [[LWZtoc3]] :: (load 8 from constant-pool)
34  ; 32BIT:   [[LI1:%[0-9]+]]:gprc = LI 55
35  ; 32BIT:   $r3 = COPY [[LI1]]
36  ; 32BIT:   $v2 = COPY [[LXVW4X1]]
37  ; 32BIT:   $f1 = COPY [[XFLOADf64_]]
38  ; 32BIT:   $r9 = COPY [[ORI2]]
39  ; 32BIT:   $r10 = COPY [[ORI3]]
40  ; 32BIT:   $f2 = COPY [[XFLOADf64_1]]
41  ; 32BIT:   BL_NOP <mcsymbol .callee[PR]>, csr_aix32_altivec, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $v2, implicit $f1, implicit $r9, implicit $r10, implicit $f2, implicit $r2, implicit-def $r1, implicit-def $v2
42  ; 32BIT:   ADJCALLSTACKUP 88, 0, implicit-def dead $r1, implicit $r1
43  ; 32BIT:   [[COPY:%[0-9]+]]:vsrc = COPY $v2
44  ; 32BIT:   BLR implicit $lr, implicit $rm
45
46  ; 64BIT-LABEL: name: caller
47  ; 64BIT: bb.0.entry:
48  ; 64BIT:   ADJCALLSTACKDOWN 120, 0, implicit-def dead $r1, implicit $r1
49  ; 64BIT:   [[LDtocCPT:%[0-9]+]]:g8rc = LDtocCPT %const.0, $x2 :: (load 8 from got)
50  ; 64BIT:   [[LXVW4X:%[0-9]+]]:vsrc = LXVW4X $zero8, killed [[LDtocCPT]] :: (load 16 from constant-pool)
51  ; 64BIT:   [[LI8_:%[0-9]+]]:g8rc = LI8 96
52  ; 64BIT:   STXVW4X killed [[LXVW4X]], $x1, killed [[LI8_]] :: (store 16)
53  ; 64BIT:   [[LIS8_:%[0-9]+]]:g8rc = LIS8 16389
54  ; 64BIT:   [[ORI8_:%[0-9]+]]:g8rc = ORI8 killed [[LIS8_]], 48905
55  ; 64BIT:   [[RLDIC:%[0-9]+]]:g8rc = RLDIC killed [[ORI8_]], 32, 1
56  ; 64BIT:   [[ORIS8_:%[0-9]+]]:g8rc = ORIS8 killed [[RLDIC]], 38314
57  ; 64BIT:   [[ORI8_1:%[0-9]+]]:g8rc = ORI8 killed [[ORIS8_]], 63376
58  ; 64BIT:   STD killed [[ORI8_1]], 112, $x1 :: (store 8)
59  ; 64BIT:   [[LDtocCPT1:%[0-9]+]]:g8rc = LDtocCPT %const.1, $x2 :: (load 8 from got)
60  ; 64BIT:   [[LXVW4X1:%[0-9]+]]:vsrc = LXVW4X $zero8, killed [[LDtocCPT1]] :: (load 16 from constant-pool)
61  ; 64BIT:   [[LD:%[0-9]+]]:g8rc = LD 104, $x1 :: (load 8)
62  ; 64BIT:   [[LD1:%[0-9]+]]:g8rc = LD 96, $x1 :: (load 8)
63  ; 64BIT:   [[LDtocCPT2:%[0-9]+]]:g8rc = LDtocCPT %const.2, $x2 :: (load 8 from got)
64  ; 64BIT:   [[XFLOADf64_:%[0-9]+]]:vsfrc = XFLOADf64 $zero8, killed [[LDtocCPT2]] :: (load 8 from constant-pool)
65  ; 64BIT:   [[LDtocCPT3:%[0-9]+]]:g8rc = LDtocCPT %const.3, $x2 :: (load 8 from got)
66  ; 64BIT:   [[XFLOADf64_1:%[0-9]+]]:vsfrc = XFLOADf64 $zero8, killed [[LDtocCPT3]] :: (load 8 from constant-pool)
67  ; 64BIT:   [[LIS8_1:%[0-9]+]]:g8rc = LIS8 16393
68  ; 64BIT:   [[ORI8_2:%[0-9]+]]:g8rc = ORI8 killed [[LIS8_1]], 8697
69  ; 64BIT:   [[RLDIC1:%[0-9]+]]:g8rc = RLDIC killed [[ORI8_2]], 32, 1
70  ; 64BIT:   [[ORIS8_1:%[0-9]+]]:g8rc = ORIS8 killed [[RLDIC1]], 61467
71  ; 64BIT:   [[ORI8_3:%[0-9]+]]:g8rc = ORI8 killed [[ORIS8_1]], 34414
72  ; 64BIT:   [[LI8_1:%[0-9]+]]:g8rc = LI8 55
73  ; 64BIT:   $x3 = COPY [[LI8_1]]
74  ; 64BIT:   $v2 = COPY [[LXVW4X1]]
75  ; 64BIT:   $f1 = COPY [[XFLOADf64_]]
76  ; 64BIT:   $x7 = COPY [[ORI8_3]]
77  ; 64BIT:   $x9 = COPY [[LD1]]
78  ; 64BIT:   $x10 = COPY [[LD]]
79  ; 64BIT:   $f2 = COPY [[XFLOADf64_1]]
80  ; 64BIT:   BL8_NOP <mcsymbol .callee[PR]>, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $v2, implicit $f1, implicit $x7, implicit $x9, implicit $x10, implicit $f2, implicit $x2, implicit-def $r1, implicit-def $v2
81  ; 64BIT:   ADJCALLSTACKUP 120, 0, implicit-def dead $r1, implicit $r1
82  ; 64BIT:   [[COPY:%[0-9]+]]:vsrc = COPY $v2
83  ; 64BIT:   BLR8 implicit $lr8, implicit $rm
84entry:
85  %call = tail call <4 x i32> (i32, <4 x i32>, double, ...) @callee(i32 signext 55, <4 x i32> <i32 170, i32 187, i32 204, i32 221>, double 3.141590e+00, <4 x i32> <i32 10, i32 20, i32 30, i32 40>, double 2.718280e+00)
86  ret void
87}
88
89declare <4 x i32> @callee(i32 signext, <4 x i32>, double, ...)
90
91