• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -mtriple=s390x-linux-gnu -mcpu=z14 -start-before=greedy %s -o - \
2# RUN:   | FileCheck %s
3#
4# Test folding of a memory operand into an fp memory instruction.
5
6--- |
7  define void @fun0(double %arg0, double %arg1, double* %Dst) { ret void }
8  define void @fun1(double %arg0, double %arg1, double* %Dst) { ret void }
9  define void @fun2(double %arg0, double %arg1, double* %Dst) { ret void }
10  define void @fun3(float %arg0, float %arg1, float* %Dst) { ret void }
11  define void @fun4(float %arg0, float %arg1, float* %Dst) { ret void }
12  define void @fun5(float %arg0, float %arg1, float* %Dst) { ret void }
13  define void @fun6(double %arg0, double %arg1, double* %Dst) { ret void }
14  define void @fun7(double %arg0, double %arg1, double* %Dst) { ret void }
15  define void @fun8(double %arg0, double %arg1, double* %Dst) { ret void }
16  define void @fun9(float %arg0, float %arg1, float* %Dst) { ret void }
17  define void @fun10(float %arg0, float %arg1, float* %Dst) { ret void }
18  define void @fun11(float %arg0, float %arg1, float* %Dst) { ret void }
19  define void @fun12(float %arg0, float %arg1, float* %Dst) { ret void }
20
21...
22
23# CHECK-LABEL: fun0:
24# CHECK: cdb     %f0, 160(%r15)                  # 8-byte Folded Reload
25---
26name:            fun0
27alignment:       16
28tracksRegLiveness: true
29registers:
30  - { id: 0, class: fp64bit }
31  - { id: 1, class: fp64bit }
32  - { id: 2, class: addr64bit }
33  - { id: 3, class: vr64bit }
34  - { id: 4, class: gr64bit }
35liveins:
36  - { reg: '$f0d', virtual-reg: '%0' }
37  - { reg: '$f2d', virtual-reg: '%1' }
38  - { reg: '$r2d', virtual-reg: '%2' }
39frameInfo:
40  maxAlignment:    1
41machineFunctionInfo: {}
42body:             |
43  bb.0:
44    liveins: $f0d, $f2d, $r2d
45
46    %2:addr64bit = COPY $r2d
47    %1:fp64bit = COPY $f2d
48    %0:fp64bit = COPY $f0d
49    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
50    nofpexcept WFCDB %0, %1, implicit-def $cc, implicit $fpc
51    %4:gr64bit = LGHI 0
52    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
53    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
54    Return
55
56...
57
58
59# CHECK-LABEL: fun1:
60# CHECK: cdb     %f0, 160(%r15)                  # 8-byte Folded Reload
61---
62name:            fun1
63alignment:       16
64tracksRegLiveness: true
65registers:
66  - { id: 0, class: fp64bit }
67  - { id: 1, class: fp64bit }
68  - { id: 2, class: addr64bit }
69  - { id: 3, class: vr64bit }
70  - { id: 4, class: gr64bit }
71liveins:
72  - { reg: '$f0d', virtual-reg: '%0' }
73  - { reg: '$f2d', virtual-reg: '%1' }
74  - { reg: '$r2d', virtual-reg: '%2' }
75frameInfo:
76  maxAlignment:    1
77machineFunctionInfo: {}
78body:             |
79  bb.0:
80    liveins: $f0d, $f2d, $r2d
81
82    %2:addr64bit = COPY $r2d
83    %1:fp64bit = COPY $f2d
84    %0:fp64bit = COPY $f0d
85    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
86    nofpexcept WFCDB %1, %0, implicit-def $cc, implicit $fpc
87    %4:gr64bit = LGHI 0
88    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
89    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
90    Return
91
92...
93
94
95# CDB can't be used if one operand is a VR64 (and not FP64).
96# CHECK-LABEL: fun2:
97# CHECK:      ld      %f0, 160(%r15)                  # 8-byte Folded Reload
98# CHECK-NEXT: wfcdb   %v16, %f0
99---
100name:            fun2
101alignment:       16
102tracksRegLiveness: true
103registers:
104  - { id: 0, class: fp64bit }
105  - { id: 1, class: vr64bit }
106  - { id: 2, class: addr64bit }
107  - { id: 3, class: vr64bit }
108  - { id: 4, class: gr64bit }
109liveins:
110  - { reg: '$f0d', virtual-reg: '%0' }
111  - { reg: '$f2d', virtual-reg: '%1' }
112  - { reg: '$r2d', virtual-reg: '%2' }
113frameInfo:
114  maxAlignment:    1
115machineFunctionInfo: {}
116body:             |
117  bb.0:
118    liveins: $f0d, $f2d, $r2d
119
120    %2:addr64bit = COPY $r2d
121    %1:vr64bit = COPY $f2d
122    %0:fp64bit = COPY $f0d
123    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f0d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
124    nofpexcept WFCDB %1, %0, implicit-def $cc, implicit $fpc
125    %4:gr64bit = LGHI 0
126    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
127    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
128    Return
129
130...
131
132
133# CHECK-LABEL: fun3:
134# CHECK: ceb     %f0, 164(%r15)                  # 4-byte Folded Reload
135---
136name:            fun3
137alignment:       16
138tracksRegLiveness: true
139registers:
140  - { id: 0, class: fp32bit }
141  - { id: 1, class: fp32bit }
142  - { id: 2, class: addr64bit }
143  - { id: 3, class: vr32bit }
144  - { id: 4, class: gr64bit }
145liveins:
146  - { reg: '$f0s', virtual-reg: '%0' }
147  - { reg: '$f2s', virtual-reg: '%1' }
148  - { reg: '$r2d', virtual-reg: '%2' }
149frameInfo:
150  maxAlignment:    1
151machineFunctionInfo: {}
152body:             |
153  bb.0:
154    liveins: $f0s, $f2s, $r2d
155
156    %2:addr64bit = COPY $r2d
157    %1:fp32bit = COPY $f2s
158    %0:fp32bit = COPY $f0s
159    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
160    nofpexcept WFCSB %0, %1, implicit-def $cc, implicit $fpc
161    %4:gr64bit = LGHI 0
162    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
163    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
164    Return
165
166...
167
168
169# CHECK-LABEL: fun4:
170# CHECK: ceb     %f0, 164(%r15)                  # 4-byte Folded Reload
171---
172name:            fun4
173alignment:       16
174tracksRegLiveness: true
175registers:
176  - { id: 0, class: fp32bit }
177  - { id: 1, class: fp32bit }
178  - { id: 2, class: addr64bit }
179  - { id: 3, class: vr32bit }
180  - { id: 4, class: gr64bit }
181liveins:
182  - { reg: '$f0s', virtual-reg: '%0' }
183  - { reg: '$f2s', virtual-reg: '%1' }
184  - { reg: '$r2d', virtual-reg: '%2' }
185frameInfo:
186  maxAlignment:    1
187machineFunctionInfo: {}
188body:             |
189  bb.0:
190    liveins: $f0s, $f2s, $r2d
191
192    %2:addr64bit = COPY $r2d
193    %1:fp32bit = COPY $f2s
194    %0:fp32bit = COPY $f0s
195    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
196    nofpexcept WFCSB %1, %0, implicit-def $cc, implicit $fpc
197    %4:gr64bit = LGHI 0
198    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
199    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
200    Return
201
202...
203
204
205# CEB can't be used if one operand is a VR32 (and not FP32).
206# CHECK-LABEL: fun5:
207# CHECK:      lde     %f0, 164(%r15)                  # 4-byte Folded Reload
208# CHECK-NEXT: wfcsb   %v16, %f0
209---
210name:            fun5
211alignment:       16
212tracksRegLiveness: true
213registers:
214  - { id: 0, class: fp32bit }
215  - { id: 1, class: vr32bit }
216  - { id: 2, class: addr64bit }
217  - { id: 3, class: vr32bit }
218  - { id: 4, class: gr64bit }
219liveins:
220  - { reg: '$f0s', virtual-reg: '%0' }
221  - { reg: '$f2s', virtual-reg: '%1' }
222  - { reg: '$r2d', virtual-reg: '%2' }
223frameInfo:
224  maxAlignment:    1
225machineFunctionInfo: {}
226body:             |
227  bb.0:
228    liveins: $f0s, $f2s, $r2d
229
230    %2:addr64bit = COPY $r2d
231    %1:vr32bit = COPY $f2s
232    %0:fp32bit = COPY $f0s
233    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f0d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
234    nofpexcept WFCSB %1, %0, implicit-def $cc, implicit $fpc
235    %4:gr64bit = LGHI 0
236    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
237    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
238    Return
239
240...
241
242
243# CHECK-LABEL: fun6:
244# CHECK: kdb     %f0, 160(%r15)                  # 8-byte Folded Reload
245---
246name:            fun6
247alignment:       16
248tracksRegLiveness: true
249registers:
250  - { id: 0, class: fp64bit }
251  - { id: 1, class: fp64bit }
252  - { id: 2, class: addr64bit }
253  - { id: 3, class: vr64bit }
254  - { id: 4, class: gr64bit }
255liveins:
256  - { reg: '$f0d', virtual-reg: '%0' }
257  - { reg: '$f2d', virtual-reg: '%1' }
258  - { reg: '$r2d', virtual-reg: '%2' }
259frameInfo:
260  maxAlignment:    1
261machineFunctionInfo: {}
262body:             |
263  bb.0:
264    liveins: $f0d, $f2d, $r2d
265
266    %2:addr64bit = COPY $r2d
267    %1:fp64bit = COPY $f2d
268    %0:fp64bit = COPY $f0d
269    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
270    nofpexcept WFKDB %0, %1, implicit-def $cc, implicit $fpc
271    %4:gr64bit = LGHI 0
272    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
273    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
274    Return
275
276...
277
278
279# CHECK-LABEL: fun7:
280# CHECK: kdb     %f0, 160(%r15)                  # 8-byte Folded Reload
281---
282name:            fun7
283alignment:       16
284tracksRegLiveness: true
285registers:
286  - { id: 0, class: fp64bit }
287  - { id: 1, class: fp64bit }
288  - { id: 2, class: addr64bit }
289  - { id: 3, class: vr64bit }
290  - { id: 4, class: gr64bit }
291liveins:
292  - { reg: '$f0d', virtual-reg: '%0' }
293  - { reg: '$f2d', virtual-reg: '%1' }
294  - { reg: '$r2d', virtual-reg: '%2' }
295frameInfo:
296  maxAlignment:    1
297machineFunctionInfo: {}
298body:             |
299  bb.0:
300    liveins: $f0d, $f2d, $r2d
301
302    %2:addr64bit = COPY $r2d
303    %1:fp64bit = COPY $f2d
304    %0:fp64bit = COPY $f0d
305    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
306    nofpexcept WFKDB %1, %0, implicit-def $cc, implicit $fpc
307    %4:gr64bit = LGHI 0
308    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
309    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
310    Return
311
312...
313
314
315# KDB can't be used if one operand is a VR64 (and not FP64).
316# CHECK-LABEL: fun8:
317# CHECK:      ld      %f0, 160(%r15)                  # 8-byte Folded Reload
318# CHECK-NEXT: wfkdb   %v16, %f0
319---
320name:            fun8
321alignment:       16
322tracksRegLiveness: true
323registers:
324  - { id: 0, class: fp64bit }
325  - { id: 1, class: vr64bit }
326  - { id: 2, class: addr64bit }
327  - { id: 3, class: vr64bit }
328  - { id: 4, class: gr64bit }
329liveins:
330  - { reg: '$f0d', virtual-reg: '%0' }
331  - { reg: '$f2d', virtual-reg: '%1' }
332  - { reg: '$r2d', virtual-reg: '%2' }
333frameInfo:
334  maxAlignment:    1
335machineFunctionInfo: {}
336body:             |
337  bb.0:
338    liveins: $f0d, $f2d, $r2d
339
340    %2:addr64bit = COPY $r2d
341    %1:vr64bit = COPY $f2d
342    %0:fp64bit = COPY $f0d
343    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f0d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
344    nofpexcept WFKDB %1, %0, implicit-def $cc, implicit $fpc
345    %4:gr64bit = LGHI 0
346    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
347    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
348    Return
349
350...
351
352
353# CHECK-LABEL: fun9:
354# CHECK: keb     %f0, 164(%r15)                  # 4-byte Folded Reload
355---
356name:            fun9
357alignment:       16
358tracksRegLiveness: true
359registers:
360  - { id: 0, class: fp32bit }
361  - { id: 1, class: fp32bit }
362  - { id: 2, class: addr64bit }
363  - { id: 3, class: vr32bit }
364  - { id: 4, class: gr64bit }
365liveins:
366  - { reg: '$f0s', virtual-reg: '%0' }
367  - { reg: '$f2s', virtual-reg: '%1' }
368  - { reg: '$r2d', virtual-reg: '%2' }
369frameInfo:
370  maxAlignment:    1
371machineFunctionInfo: {}
372body:             |
373  bb.0:
374    liveins: $f0s, $f2s, $r2d
375
376    %2:addr64bit = COPY $r2d
377    %1:fp32bit = COPY $f2s
378    %0:fp32bit = COPY $f0s
379    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
380    nofpexcept WFKSB %0, %1, implicit-def $cc, implicit $fpc
381    %4:gr64bit = LGHI 0
382    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
383    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
384    Return
385
386...
387
388
389# CHECK-LABEL: fun10:
390# CHECK: keb     %f0, 164(%r15)                  # 4-byte Folded Reload
391---
392name:            fun10
393alignment:       16
394tracksRegLiveness: true
395registers:
396  - { id: 0, class: fp32bit }
397  - { id: 1, class: fp32bit }
398  - { id: 2, class: addr64bit }
399  - { id: 3, class: vr32bit }
400  - { id: 4, class: gr64bit }
401liveins:
402  - { reg: '$f0s', virtual-reg: '%0' }
403  - { reg: '$f2s', virtual-reg: '%1' }
404  - { reg: '$r2d', virtual-reg: '%2' }
405frameInfo:
406  maxAlignment:    1
407machineFunctionInfo: {}
408body:             |
409  bb.0:
410    liveins: $f0s, $f2s, $r2d
411
412    %2:addr64bit = COPY $r2d
413    %1:fp32bit = COPY $f2s
414    %0:fp32bit = COPY $f0s
415    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
416    nofpexcept WFKSB %1, %0, implicit-def $cc, implicit $fpc
417    %4:gr64bit = LGHI 0
418    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
419    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
420    Return
421
422...
423
424
425# CEB can't be used if one operand is a VR32 (and not FP32).
426# CHECK-LABEL: fun11:
427# CHECK:      lde     %f0, 164(%r15)                  # 4-byte Folded Reload
428# CHECK-NEXT: wfksb   %v16, %f0
429---
430name:            fun11
431alignment:       16
432tracksRegLiveness: true
433registers:
434  - { id: 0, class: fp32bit }
435  - { id: 1, class: vr32bit }
436  - { id: 2, class: addr64bit }
437  - { id: 3, class: vr32bit }
438  - { id: 4, class: gr64bit }
439liveins:
440  - { reg: '$f0s', virtual-reg: '%0' }
441  - { reg: '$f2s', virtual-reg: '%1' }
442  - { reg: '$r2d', virtual-reg: '%2' }
443frameInfo:
444  maxAlignment:    1
445machineFunctionInfo: {}
446body:             |
447  bb.0:
448    liveins: $f0s, $f2s, $r2d
449
450    %2:addr64bit = COPY $r2d
451    %1:vr32bit = COPY $f2s
452    %0:fp32bit = COPY $f0s
453    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f0d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
454    nofpexcept WFKSB %1, %0, implicit-def $cc, implicit $fpc
455    %4:gr64bit = LGHI 0
456    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
457    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
458    Return
459
460...
461
462
463# This test case involves a 128 bit operand (VGMF generating float 1.0).
464# CHECK-LABEL: fun12:
465# CHECK: vgmf    %v0, 2, 8
466# CHECK-NEXT: ceb     %f0, 164(%r15)          # 4-byte Folded Reload
467---
468name:            fun12
469alignment:       16
470tracksRegLiveness: true
471registers:
472  - { id: 0, class: fp32bit }
473  - { id: 1, class: vr128bit }
474  - { id: 2, class: addr64bit }
475  - { id: 3, class: vr32bit }
476  - { id: 4, class: gr64bit }
477liveins:
478  - { reg: '$f0s', virtual-reg: '%0' }
479  - { reg: '$f2s', virtual-reg: '%1' }
480  - { reg: '$r2d', virtual-reg: '%2' }
481frameInfo:
482  maxAlignment:    1
483machineFunctionInfo: {}
484body:             |
485  bb.0:
486    liveins: $f0s, $f2s, $r2d
487
488    %2:addr64bit = COPY $r2d
489    %0:fp32bit = COPY $f0s
490    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r0d, 12, implicit-def dead early-clobber $r1d, 12, implicit-def dead early-clobber $r2d, 12, implicit-def dead early-clobber $r3d, 12, implicit-def dead early-clobber $r4d, 12, implicit-def dead early-clobber $r5d, 12, implicit-def dead early-clobber $r6d, 12, implicit-def dead early-clobber $r7d, 12, implicit-def dead early-clobber $r8d, 12, implicit-def dead early-clobber $r9d, 12, implicit-def dead early-clobber $r10d, 12, implicit-def dead early-clobber $r11d, 12, implicit-def dead early-clobber $r12d, 12, implicit-def dead early-clobber $r13d, 12, implicit-def dead early-clobber $r14d, 12, implicit-def dead early-clobber $f0d, 12, implicit-def dead early-clobber $f1d, 12, implicit-def dead early-clobber $f2d, 12, implicit-def dead early-clobber $f3d, 12, implicit-def dead early-clobber $f4d, 12, implicit-def dead early-clobber $f5d, 12, implicit-def dead early-clobber $f6d, 12, implicit-def dead early-clobber $f7d, 12, implicit-def dead early-clobber $f8d, 12, implicit-def dead early-clobber $f9d, 12, implicit-def dead early-clobber $f10d, 12, implicit-def dead early-clobber $f11d, 12, implicit-def dead early-clobber $f12d, 12, implicit-def dead early-clobber $f13d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f14d, 12, implicit-def dead early-clobber $f15d
491    %1:vr128bit = VGMF 2, 8
492    nofpexcept WFCSB %0, %1.subreg_h32:vr128bit, implicit-def $cc, implicit $fpc
493    %4:gr64bit = LGHI 0
494    %4:gr64bit = LOCGHI %4, 1, 15, 8, implicit killed $cc
495    STG %4, %2, 0, $noreg :: (store 8 into %ir.Dst)
496    Return
497
498...
499