1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=+altivec -vec-extabi \
3 ; RUN: -stop-after=machine-cp -mtriple powerpc-ibm-aix-xcoff < %s | \
4 ; RUN: FileCheck %s --check-prefix=MIR32
6 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=+altivec -vec-extabi \
7 ; RUN: -stop-after=machine-cp -mtriple powerpc64-ibm-aix-xcoff < %s | \
8 ; RUN: FileCheck %s --check-prefix=MIR64
10 %struct.Test = type { double, double, double, double }
12 @__const.caller.t = private unnamed_addr constant %struct.Test { double 0.000000e+00, double 1.000000e+00, double 2.000000e+00, double 3.000000e+00 }, align 8
14 define double @caller() {
16 ; MIR32-LABEL: name: caller
18 ; MIR32-NEXT: renamable $r3 = LI 0
19 ; MIR32-NEXT: renamable $r4 = LIS 16392
20 ; MIR32-NEXT: STW killed renamable $r4, 180, $r1 :: (store (s32) into unknown-address + 24)
21 ; MIR32-NEXT: renamable $r4 = LIS 16384
22 ; MIR32-NEXT: STW renamable $r3, 184, $r1 :: (store (s32) into unknown-address + 28)
23 ; MIR32-NEXT: STW renamable $r3, 176, $r1 :: (store (s32) into unknown-address + 20)
24 ; MIR32-NEXT: STW killed renamable $r4, 172, $r1 :: (store (s32) into unknown-address + 16)
25 ; MIR32-NEXT: STW renamable $r3, 168, $r1 :: (store (s32) into unknown-address + 12)
26 ; MIR32-NEXT: renamable $r4 = LIS 16368
27 ; MIR32-NEXT: STW killed renamable $r4, 164, $r1 :: (store (s32) into unknown-address + 8)
28 ; MIR32-NEXT: STW renamable $r3, 160, $r1 :: (store (s32) into unknown-address + 4)
29 ; MIR32-NEXT: STW killed renamable $r3, 156, $r1 :: (store (s32))
30 ; MIR32-NEXT: ADJCALLSTACKDOWN 188, 0, implicit-def dead $r1, implicit $r1
31 ; MIR32-NEXT: renamable $vsl0 = XXLXORz
32 ; MIR32-NEXT: renamable $r3 = LI 136
33 ; MIR32-NEXT: renamable $r4 = LI 120
34 ; MIR32-NEXT: STXVW4X renamable $vsl0, $r1, killed renamable $r3 :: (store (s128), align 8)
35 ; MIR32-NEXT: renamable $r3 = LI 104
36 ; MIR32-NEXT: STXVW4X renamable $vsl0, $r1, killed renamable $r4 :: (store (s128), align 8)
37 ; MIR32-NEXT: renamable $r4 = LI 88
38 ; MIR32-NEXT: STXVW4X renamable $vsl0, $r1, killed renamable $r3 :: (store (s128), align 8)
39 ; MIR32-NEXT: STXVW4X renamable $vsl0, $r1, killed renamable $r4 :: (store (s128), align 8)
40 ; MIR32-NEXT: renamable $r3 = LI 72
41 ; MIR32-NEXT: renamable $r4 = LWZtoc %const.0, $r2 :: (load (s32) from got)
42 ; MIR32-NEXT: STXVW4X killed renamable $vsl0, $r1, killed renamable $r3 :: (store (s128), align 8)
43 ; MIR32-NEXT: renamable $r3 = LI 48
44 ; MIR32-NEXT: renamable $vsl0 = LXVD2X $zero, killed renamable $r4 :: (load (s128) from constant-pool)
45 ; MIR32-NEXT: renamable $r4 = LI 512
46 ; MIR32-NEXT: STXVD2X killed renamable $vsl0, $r1, killed renamable $r3 :: (store (s128))
47 ; MIR32-NEXT: STW killed renamable $r4, 152, $r1 :: (store (s32))
48 ; MIR32-NEXT: $f1 = XXLXORdpz
49 ; MIR32-NEXT: $f2 = XXLXORdpz
50 ; MIR32-NEXT: $v2 = XXLXORz
51 ; MIR32-NEXT: $v3 = XXLXORz
52 ; MIR32-NEXT: $v4 = XXLXORz
53 ; MIR32-NEXT: $v5 = XXLXORz
54 ; MIR32-NEXT: $v6 = XXLXORz
55 ; MIR32-NEXT: $v7 = XXLXORz
56 ; MIR32-NEXT: $v8 = XXLXORz
57 ; MIR32-NEXT: $r3 = LI 128
58 ; MIR32-NEXT: $r4 = LI 256
59 ; MIR32-NEXT: $v9 = XXLXORz
60 ; MIR32-NEXT: $v10 = XXLXORz
61 ; MIR32-NEXT: $v11 = XXLXORz
62 ; MIR32-NEXT: $v12 = XXLXORz
63 ; MIR32-NEXT: $v13 = XXLXORz
64 ; MIR32-NEXT: $f3 = XXLXORdpz
65 ; MIR32-NEXT: $f4 = XXLXORdpz
66 ; MIR32-NEXT: $f5 = XXLXORdpz
67 ; MIR32-NEXT: $f6 = XXLXORdpz
68 ; MIR32-NEXT: $f7 = XXLXORdpz
69 ; MIR32-NEXT: $f8 = XXLXORdpz
70 ; MIR32-NEXT: $f9 = XXLXORdpz
71 ; MIR32-NEXT: $f10 = XXLXORdpz
72 ; MIR32-NEXT: $f11 = XXLXORdpz
73 ; MIR32-NEXT: $f12 = XXLXORdpz
74 ; MIR32-NEXT: $f13 = XXLXORdpz
75 ; MIR32-NEXT: BL_NOP <mcsymbol .callee[PR]>, csr_aix32_altivec, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $f1, implicit killed $f2, implicit killed $v2, implicit killed $v3, implicit killed $v4, implicit killed $v5, implicit killed $v6, implicit killed $v7, implicit killed $v8, implicit killed $v9, implicit killed $v10, implicit killed $v11, implicit killed $v12, implicit killed $v13, implicit killed $f3, implicit killed $f4, implicit killed $f5, implicit killed $f6, implicit killed $f7, implicit killed $f8, implicit killed $f9, implicit killed $f10, implicit killed $f11, implicit killed $f12, implicit killed $f13, implicit $r2, implicit-def $r1, implicit-def $f1
76 ; MIR32-NEXT: ADJCALLSTACKUP 188, 0, implicit-def dead $r1, implicit $r1
77 ; MIR32-NEXT: BLR implicit $lr, implicit $rm, implicit $f1
79 ; MIR64-LABEL: name: caller
81 ; MIR64-NEXT: renamable $x3 = LI8 2049
82 ; MIR64-NEXT: renamable $x4 = LI8 1
83 ; MIR64-NEXT: renamable $x3 = RLDIC killed renamable $x3, 51, 1
84 ; MIR64-NEXT: STD killed renamable $x3, 216, $x1 :: (store (s64) into unknown-address + 24, align 4)
85 ; MIR64-NEXT: renamable $x3 = LI8 1023
86 ; MIR64-NEXT: renamable $x4 = RLDIC killed renamable $x4, 62, 1
87 ; MIR64-NEXT: STD killed renamable $x4, 208, $x1 :: (store (s64) into unknown-address + 16, align 4)
88 ; MIR64-NEXT: renamable $x4 = LI8 0
89 ; MIR64-NEXT: STD renamable $x4, 192, $x1 :: (store (s64), align 4)
90 ; MIR64-NEXT: renamable $x3 = RLDIC killed renamable $x3, 52, 2
91 ; MIR64-NEXT: STD killed renamable $x3, 200, $x1 :: (store (s64) into unknown-address + 8, align 4)
92 ; MIR64-NEXT: ADJCALLSTACKDOWN 224, 0, implicit-def dead $r1, implicit $r1
93 ; MIR64-NEXT: renamable $vsl0 = XXLXORz
94 ; MIR64-NEXT: renamable $x3 = LI8 160
95 ; MIR64-NEXT: STXVW4X renamable $vsl0, $x1, killed renamable $x3 :: (store (s128), align 8)
96 ; MIR64-NEXT: renamable $x3 = LI8 144
97 ; MIR64-NEXT: STXVW4X renamable $vsl0, $x1, killed renamable $x3 :: (store (s128), align 8)
98 ; MIR64-NEXT: renamable $x3 = LI8 128
99 ; MIR64-NEXT: STXVW4X killed renamable $vsl0, $x1, killed renamable $x3 :: (store (s128), align 8)
100 ; MIR64-NEXT: renamable $x3 = LDtocCPT %const.0, $x2 :: (load (s64) from got)
101 ; MIR64-NEXT: renamable $vsl0 = LXVD2X $zero8, killed renamable $x3 :: (load (s128) from constant-pool)
102 ; MIR64-NEXT: renamable $x3 = LI8 80
103 ; MIR64-NEXT: STXVD2X killed renamable $vsl0, $x1, killed renamable $x3 :: (store (s128))
104 ; MIR64-NEXT: renamable $x3 = LI8 512
105 ; MIR64-NEXT: STD killed renamable $x3, 184, $x1 :: (store (s64))
106 ; MIR64-NEXT: STD killed renamable $x4, 176, $x1 :: (store (s64))
107 ; MIR64-NEXT: $f1 = XXLXORdpz
108 ; MIR64-NEXT: $f2 = XXLXORdpz
109 ; MIR64-NEXT: $v2 = XXLXORz
110 ; MIR64-NEXT: $v3 = XXLXORz
111 ; MIR64-NEXT: $v4 = XXLXORz
112 ; MIR64-NEXT: $v5 = XXLXORz
113 ; MIR64-NEXT: $v6 = XXLXORz
114 ; MIR64-NEXT: $x3 = LI8 128
115 ; MIR64-NEXT: $x4 = LI8 256
116 ; MIR64-NEXT: $v7 = XXLXORz
117 ; MIR64-NEXT: $v8 = XXLXORz
118 ; MIR64-NEXT: $v9 = XXLXORz
119 ; MIR64-NEXT: $v10 = XXLXORz
120 ; MIR64-NEXT: $v11 = XXLXORz
121 ; MIR64-NEXT: $v12 = XXLXORz
122 ; MIR64-NEXT: $v13 = XXLXORz
123 ; MIR64-NEXT: $f3 = XXLXORdpz
124 ; MIR64-NEXT: $f4 = XXLXORdpz
125 ; MIR64-NEXT: $f5 = XXLXORdpz
126 ; MIR64-NEXT: $f6 = XXLXORdpz
127 ; MIR64-NEXT: $f7 = XXLXORdpz
128 ; MIR64-NEXT: $f8 = XXLXORdpz
129 ; MIR64-NEXT: $f9 = XXLXORdpz
130 ; MIR64-NEXT: $f10 = XXLXORdpz
131 ; MIR64-NEXT: $f11 = XXLXORdpz
132 ; MIR64-NEXT: $f12 = XXLXORdpz
133 ; MIR64-NEXT: $f13 = XXLXORdpz
134 ; MIR64-NEXT: BL8_NOP <mcsymbol .callee[PR]>, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $f1, implicit killed $f2, implicit killed $v2, implicit killed $v3, implicit killed $v4, implicit killed $v5, implicit killed $v6, implicit killed $v7, implicit killed $v8, implicit killed $v9, implicit killed $v10, implicit killed $v11, implicit killed $v12, implicit killed $v13, implicit killed $f3, implicit killed $f4, implicit killed $f5, implicit killed $f6, implicit killed $f7, implicit killed $f8, implicit killed $f9, implicit killed $f10, implicit killed $f11, implicit killed $f12, implicit killed $f13, implicit $x2, implicit-def $r1, implicit-def $f1
135 ; MIR64-NEXT: ADJCALLSTACKUP 224, 0, implicit-def dead $r1, implicit $r1
136 ; MIR64-NEXT: BLR8 implicit $lr8, implicit $rm, implicit $f1
138 %call = tail call double @callee(i32 signext 128, i32 signext 256, double 0.000000e+00, double 0.000000e+00, <2 x double> <double 0.000000e+00, double 0.000000e+00>, <2 x double> <double 0.000000e+00, double 0.000000e+00>, <2 x double> <double 0.000000e+00, double 0.000000e+00>, <2 x double> <double 0.000000e+00, double 0.000000e+00>, <2 x double> <double 0.000000e+00, double 0.000000e+00>, <2 x double> <double 0.000000e+00, double 0.000000e+00>, <2 x double> <double 0.000000e+00, double 0.000000e+00>, <2 x double> <double 0.000000e+00, double 0.000000e+00>, <2 x double> <double 0.000000e+00, double 0.000000e+00>, <2 x double> <double 0.000000e+00, double 0.000000e+00>, <2 x double> <double 0.000000e+00, double 0.000000e+00>, <2 x double> <double 0.000000e+00, double 0.000000e+00>, <2 x double> <double 2.400000e+01, double 2.500000e+01>, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, i32 signext 512, ptr nonnull byval(%struct.Test) align 4 @__const.caller.t)
142 declare double @callee(i32 signext, i32 signext, double, double, <2 x double>, <2 x double>, <2 x double>, <2 x double>, <2 x double>, <2 x double>, <2 x double>, <2 x double>, <2 x double>, <2 x double>, <2 x double>, <2 x double>, <2 x double>, double, double, double, double, double, double, double, double, double, double, double, i32 signext, ptr byval(%struct.Test) align 8)