Debian Codegraph @

llvm/test/CodeGen/PowerPC/dmrp-spill.ll

raw
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -disable-auto-paired-vec-st=false -ppc-asm-full-reg-names \
4 ; RUN: -ppc-vsr-nums-as-vr -mcpu=future < %s | FileCheck %s
5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-aix \
6 ; RUN: -disable-auto-paired-vec-st=false -ppc-asm-full-reg-names \
7 ; RUN: -ppc-vsr-nums-as-vr -mcpu=future < %s | FileCheck %s --check-prefix=AIX
8 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-aix \
9 ; RUN: -disable-auto-paired-vec-st=false -ppc-asm-full-reg-names \
10 ; RUN: -ppc-vsr-nums-as-vr -mcpu=future < %s | FileCheck %s --check-prefix=AIX32
11
12 declare void @dummy_func()
13 declare <2048 x i1> @llvm.ppc.mma.dmsha3hash(<2048 x i1>, i32)
14
15 define dso_local void @test_dmsha3hash(ptr %vopp, ptr %resp) nounwind {
16 ; CHECK-LABEL: test_dmsha3hash:
17 ; CHECK: # %bb.0: # %entry
18 ; CHECK-NEXT: mflr r0
19 ; CHECK-NEXT: std r0, 16(r1)
20 ; CHECK-NEXT: stdu r1, -304(r1)
21 ; CHECK-NEXT: std r30, 288(r1) # 8-byte Folded Spill
22 ; CHECK-NEXT: lxvp vsp34, 0(r3)
23 ; CHECK-NEXT: lxvp vsp36, 32(r3)
24 ; CHECK-NEXT: lxvp vsp32, 64(r3)
25 ; CHECK-NEXT: lxvp vsp38, 96(r3)
26 ; CHECK-NEXT: lxvp vsp40, 128(r3)
27 ; CHECK-NEXT: lxvp vsp42, 160(r3)
28 ; CHECK-NEXT: lxvp vsp44, 192(r3)
29 ; CHECK-NEXT: lxvp vsp46, 224(r3)
30 ; CHECK-NEXT: dmxxinstdmr512 wacc_hi1, vsp36, vsp34, 1
31 ; CHECK-NEXT: dmxxinstdmr512 wacc1, vsp38, vsp32, 0
32 ; CHECK-NEXT: dmxxinstdmr512 wacc_hi0, vsp42, vsp40, 1
33 ; CHECK-NEXT: dmxxinstdmr512 wacc0, vsp46, vsp44, 0
34 ; CHECK-NEXT: dmsha3hash dmrp0, 5
35 ; CHECK-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc1, 0
36 ; CHECK-NEXT: stxvp vsp36, 128(r1)
37 ; CHECK-NEXT: stxvp vsp34, 96(r1)
38 ; CHECK-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc_hi1, 1
39 ; CHECK-NEXT: stxvp vsp36, 64(r1)
40 ; CHECK-NEXT: stxvp vsp34, 32(r1)
41 ; CHECK-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc0, 0
42 ; CHECK-NEXT: stxvp vsp36, 256(r1)
43 ; CHECK-NEXT: stxvp vsp34, 224(r1)
44 ; CHECK-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc_hi0, 1
45 ; CHECK-NEXT: mr r30, r4
46 ; CHECK-NEXT: stxvp vsp36, 192(r1)
47 ; CHECK-NEXT: stxvp vsp34, 160(r1)
48 ; CHECK-NEXT: bl dummy_func@notoc
49 ; CHECK-NEXT: lxvp vsp34, 128(r1)
50 ; CHECK-NEXT: lxvp vsp36, 96(r1)
51 ; CHECK-NEXT: dmxxinstdmr512 wacc1, vsp34, vsp36, 0
52 ; CHECK-NEXT: lxvp vsp34, 64(r1)
53 ; CHECK-NEXT: lxvp vsp36, 32(r1)
54 ; CHECK-NEXT: dmxxinstdmr512 wacc_hi1, vsp34, vsp36, 1
55 ; CHECK-NEXT: lxvp vsp34, 256(r1)
56 ; CHECK-NEXT: lxvp vsp36, 224(r1)
57 ; CHECK-NEXT: dmxxinstdmr512 wacc0, vsp34, vsp36, 0
58 ; CHECK-NEXT: lxvp vsp34, 192(r1)
59 ; CHECK-NEXT: lxvp vsp36, 160(r1)
60 ; CHECK-NEXT: dmxxinstdmr512 wacc_hi0, vsp34, vsp36, 1
61 ; CHECK-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc0, 0
62 ; CHECK-NEXT: stxvp vsp34, 224(r30)
63 ; CHECK-NEXT: stxvp vsp36, 192(r30)
64 ; CHECK-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc_hi0, 1
65 ; CHECK-NEXT: stxvp vsp34, 160(r30)
66 ; CHECK-NEXT: stxvp vsp36, 128(r30)
67 ; CHECK-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc1, 0
68 ; CHECK-NEXT: stxvp vsp34, 96(r30)
69 ; CHECK-NEXT: stxvp vsp36, 64(r30)
70 ; CHECK-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc_hi1, 1
71 ; CHECK-NEXT: stxvp vsp34, 32(r30)
72 ; CHECK-NEXT: stxvp vsp36, 0(r30)
73 ; CHECK-NEXT: ld r30, 288(r1) # 8-byte Folded Reload
74 ; CHECK-NEXT: addi r1, r1, 304
75 ; CHECK-NEXT: ld r0, 16(r1)
76 ; CHECK-NEXT: mtlr r0
77 ; CHECK-NEXT: blr
78 ;
79 ; AIX-LABEL: test_dmsha3hash:
80 ; AIX: # %bb.0: # %entry
81 ; AIX-NEXT: mflr r0
82 ; AIX-NEXT: std r0, 16(r1)
83 ; AIX-NEXT: stdu r1, -384(r1)
84 ; AIX-NEXT: std r31, 376(r1) # 8-byte Folded Spill
85 ; AIX-NEXT: lxvp vsp34, 224(r3)
86 ; AIX-NEXT: lxvp vsp36, 192(r3)
87 ; AIX-NEXT: lxvp vsp32, 160(r3)
88 ; AIX-NEXT: lxvp vsp38, 128(r3)
89 ; AIX-NEXT: lxvp vsp40, 96(r3)
90 ; AIX-NEXT: lxvp vsp42, 64(r3)
91 ; AIX-NEXT: lxvp vsp44, 32(r3)
92 ; AIX-NEXT: lxvp vsp46, 0(r3)
93 ; AIX-NEXT: dmxxinstdmr512 wacc_hi1, vsp36, vsp34, 1
94 ; AIX-NEXT: dmxxinstdmr512 wacc1, vsp38, vsp32, 0
95 ; AIX-NEXT: dmxxinstdmr512 wacc_hi0, vsp42, vsp40, 1
96 ; AIX-NEXT: dmxxinstdmr512 wacc0, vsp46, vsp44, 0
97 ; AIX-NEXT: dmsha3hash dmrp0, 5
98 ; AIX-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc1, 0
99 ; AIX-NEXT: stxvp vsp36, 112(r1)
100 ; AIX-NEXT: stxvp vsp34, 144(r1)
101 ; AIX-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc_hi1, 1
102 ; AIX-NEXT: stxvp vsp36, 176(r1)
103 ; AIX-NEXT: stxvp vsp34, 208(r1)
104 ; AIX-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc0, 0
105 ; AIX-NEXT: stxvp vsp36, 240(r1)
106 ; AIX-NEXT: stxvp vsp34, 272(r1)
107 ; AIX-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc_hi0, 1
108 ; AIX-NEXT: mr r31, r4
109 ; AIX-NEXT: stxvp vsp36, 304(r1)
110 ; AIX-NEXT: stxvp vsp34, 336(r1)
111 ; AIX-NEXT: bl .dummy_func[PR]
112 ; AIX-NEXT: nop
113 ; AIX-NEXT: lxvp vsp34, 112(r1)
114 ; AIX-NEXT: lxvp vsp36, 144(r1)
115 ; AIX-NEXT: dmxxinstdmr512 wacc1, vsp34, vsp36, 0
116 ; AIX-NEXT: lxvp vsp34, 176(r1)
117 ; AIX-NEXT: lxvp vsp36, 208(r1)
118 ; AIX-NEXT: dmxxinstdmr512 wacc_hi1, vsp34, vsp36, 1
119 ; AIX-NEXT: lxvp vsp34, 240(r1)
120 ; AIX-NEXT: lxvp vsp36, 272(r1)
121 ; AIX-NEXT: dmxxinstdmr512 wacc0, vsp34, vsp36, 0
122 ; AIX-NEXT: lxvp vsp34, 304(r1)
123 ; AIX-NEXT: lxvp vsp36, 336(r1)
124 ; AIX-NEXT: dmxxinstdmr512 wacc_hi0, vsp34, vsp36, 1
125 ; AIX-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc_hi1, 1
126 ; AIX-NEXT: stxvp vsp36, 224(r31)
127 ; AIX-NEXT: stxvp vsp34, 192(r31)
128 ; AIX-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc1, 0
129 ; AIX-NEXT: stxvp vsp36, 160(r31)
130 ; AIX-NEXT: stxvp vsp34, 128(r31)
131 ; AIX-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc_hi0, 1
132 ; AIX-NEXT: stxvp vsp36, 96(r31)
133 ; AIX-NEXT: stxvp vsp34, 64(r31)
134 ; AIX-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc0, 0
135 ; AIX-NEXT: stxvp vsp36, 32(r31)
136 ; AIX-NEXT: stxvp vsp34, 0(r31)
137 ; AIX-NEXT: ld r31, 376(r1) # 8-byte Folded Reload
138 ; AIX-NEXT: addi r1, r1, 384
139 ; AIX-NEXT: ld r0, 16(r1)
140 ; AIX-NEXT: mtlr r0
141 ; AIX-NEXT: blr
142 ;
143 ; AIX32-LABEL: test_dmsha3hash:
144 ; AIX32: # %bb.0: # %entry
145 ; AIX32-NEXT: mflr r0
146 ; AIX32-NEXT: stw r0, 8(r1)
147 ; AIX32-NEXT: stwu r1, -336(r1)
148 ; AIX32-NEXT: stw r31, 332(r1) # 4-byte Folded Spill
149 ; AIX32-NEXT: lxvp vsp34, 224(r3)
150 ; AIX32-NEXT: lxvp vsp36, 192(r3)
151 ; AIX32-NEXT: lxvp vsp32, 160(r3)
152 ; AIX32-NEXT: lxvp vsp38, 128(r3)
153 ; AIX32-NEXT: lxvp vsp40, 96(r3)
154 ; AIX32-NEXT: lxvp vsp42, 64(r3)
155 ; AIX32-NEXT: lxvp vsp44, 32(r3)
156 ; AIX32-NEXT: lxvp vsp46, 0(r3)
157 ; AIX32-NEXT: dmxxinstdmr512 wacc_hi1, vsp36, vsp34, 1
158 ; AIX32-NEXT: dmxxinstdmr512 wacc1, vsp38, vsp32, 0
159 ; AIX32-NEXT: dmxxinstdmr512 wacc_hi0, vsp42, vsp40, 1
160 ; AIX32-NEXT: dmxxinstdmr512 wacc0, vsp46, vsp44, 0
161 ; AIX32-NEXT: dmsha3hash dmrp0, 5
162 ; AIX32-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc1, 0
163 ; AIX32-NEXT: stxvp vsp36, 64(r1)
164 ; AIX32-NEXT: stxvp vsp34, 96(r1)
165 ; AIX32-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc_hi1, 1
166 ; AIX32-NEXT: stxvp vsp36, 128(r1)
167 ; AIX32-NEXT: stxvp vsp34, 160(r1)
168 ; AIX32-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc0, 0
169 ; AIX32-NEXT: stxvp vsp36, 192(r1)
170 ; AIX32-NEXT: stxvp vsp34, 224(r1)
171 ; AIX32-NEXT: dmxxextfdmr512 vsp36, vsp34, wacc_hi0, 1
172 ; AIX32-NEXT: mr r31, r4
173 ; AIX32-NEXT: stxvp vsp36, 256(r1)
174 ; AIX32-NEXT: stxvp vsp34, 288(r1)
175 ; AIX32-NEXT: bl .dummy_func[PR]
176 ; AIX32-NEXT: nop
177 ; AIX32-NEXT: lxvp vsp34, 64(r1)
178 ; AIX32-NEXT: lxvp vsp36, 96(r1)
179 ; AIX32-NEXT: dmxxinstdmr512 wacc1, vsp34, vsp36, 0
180 ; AIX32-NEXT: lxvp vsp34, 128(r1)
181 ; AIX32-NEXT: lxvp vsp36, 160(r1)
182 ; AIX32-NEXT: dmxxinstdmr512 wacc_hi1, vsp34, vsp36, 1
183 ; AIX32-NEXT: lxvp vsp34, 192(r1)
184 ; AIX32-NEXT: lxvp vsp36, 224(r1)
185 ; AIX32-NEXT: dmxxinstdmr512 wacc0, vsp34, vsp36, 0
186 ; AIX32-NEXT: lxvp vsp34, 256(r1)
187 ; AIX32-NEXT: lxvp vsp36, 288(r1)
188 ; AIX32-NEXT: dmxxinstdmr512 wacc_hi0, vsp34, vsp36, 1
189 ; AIX32-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc_hi1, 1
190 ; AIX32-NEXT: stxvp vsp36, 224(r31)
191 ; AIX32-NEXT: stxvp vsp34, 192(r31)
192 ; AIX32-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc1, 0
193 ; AIX32-NEXT: stxvp vsp36, 160(r31)
194 ; AIX32-NEXT: stxvp vsp34, 128(r31)
195 ; AIX32-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc_hi0, 1
196 ; AIX32-NEXT: stxvp vsp36, 96(r31)
197 ; AIX32-NEXT: stxvp vsp34, 64(r31)
198 ; AIX32-NEXT: dmxxextfdmr512 vsp34, vsp36, wacc0, 0
199 ; AIX32-NEXT: stxvp vsp36, 32(r31)
200 ; AIX32-NEXT: stxvp vsp34, 0(r31)
201 ; AIX32-NEXT: lwz r31, 332(r1) # 4-byte Folded Reload
202 ; AIX32-NEXT: addi r1, r1, 336
203 ; AIX32-NEXT: lwz r0, 8(r1)
204 ; AIX32-NEXT: mtlr r0
205 ; AIX32-NEXT: blr
206 entry:
207 %0 = load <2048 x i1>, ptr %vopp, align 64
208 %2 = tail call <2048 x i1> @llvm.ppc.mma.dmsha3hash(<2048 x i1> %0, i32 5)
209 tail call void @dummy_func()
210 %3 = tail call <2048 x i1> @llvm.ppc.mma.dmsha3hash(<2048 x i1> %0, i32 5)
211 store <2048 x i1> %2, ptr %resp, align 64
212 ret void
213 }