aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/AMDGPU/eliminate-frame-index-scalar-bit-ops.mir
blob: aecff1b13171db2e3350bc2889b64e8c7618f302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx700 -verify-machineinstrs -run-pass=prologepilog %s -o - | FileCheck -check-prefix=MUBUFW64 %s
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 -verify-machineinstrs -run-pass=prologepilog %s -o - | FileCheck -check-prefix=MUBUFW64 %s
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs -run-pass=prologepilog %s -o - | FileCheck -check-prefix=MUBUFW64 %s
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -verify-machineinstrs -run-pass=prologepilog %s -o - | FileCheck -check-prefix=MUBUFW64 %s
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -verify-machineinstrs -run-pass=prologepilog %s -o - | FileCheck -check-prefix=MUBUFW32 %s

# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx942 -verify-machineinstrs -run-pass=prologepilog %s -o - | FileCheck -check-prefix=FLATSCRW64 %s
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -verify-machineinstrs -run-pass=prologepilog %s -o - | FileCheck -check-prefix=FLATSCRW32 %s
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 -verify-machineinstrs -run-pass=prologepilog %s -o - | FileCheck -check-prefix=FLATSCRW32 %s

---
name: s_or_b32__inline_imm__fi_offset0
tracksRegLiveness: true
stack:
  - { id: 0, size: 32, alignment: 16 }
machineFunctionInfo:
  scratchRSrcReg:  '$sgpr0_sgpr1_sgpr2_sgpr3'
  frameOffsetReg:  '$sgpr33'
  stackPtrOffsetReg: '$sgpr32'
body:             |
  bb.0:
    ; MUBUFW64-LABEL: name: s_or_b32__inline_imm__fi_offset0
    ; MUBUFW64: $sgpr4 = S_LSHR_B32 $sgpr32, 6, implicit-def dead $scc
    ; MUBUFW64-NEXT: renamable $sgpr7 = S_OR_B32 12, killed $sgpr4, implicit-def $scc
    ; MUBUFW64-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; MUBUFW32-LABEL: name: s_or_b32__inline_imm__fi_offset0
    ; MUBUFW32: $sgpr4 = S_LSHR_B32 $sgpr32, 5, implicit-def dead $scc
    ; MUBUFW32-NEXT: renamable $sgpr7 = S_OR_B32 12, killed $sgpr4, implicit-def $scc
    ; MUBUFW32-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; FLATSCRW64-LABEL: name: s_or_b32__inline_imm__fi_offset0
    ; FLATSCRW64: renamable $sgpr7 = S_OR_B32 12, $sgpr32, implicit-def $scc
    ; FLATSCRW64-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; FLATSCRW32-LABEL: name: s_or_b32__inline_imm__fi_offset0
    ; FLATSCRW32: renamable $sgpr7 = S_OR_B32 12, $sgpr32, implicit-def $scc
    ; FLATSCRW32-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    renamable $sgpr7 = S_OR_B32 12, %stack.0, implicit-def $scc
    SI_RETURN implicit $sgpr7, implicit $scc

...

---
name: s_or_b32__literal__fi_offset96
tracksRegLiveness: true
stack:
  - { id: 0, size: 96, alignment: 16 }
  - { id: 1, size: 24, alignment: 4 }
machineFunctionInfo:
  scratchRSrcReg:  '$sgpr0_sgpr1_sgpr2_sgpr3'
  frameOffsetReg:  '$sgpr33'
  stackPtrOffsetReg: '$sgpr32'
body:             |
  bb.0:
    ; MUBUFW64-LABEL: name: s_or_b32__literal__fi_offset96
    ; MUBUFW64: $sgpr4 = S_LSHR_B32 $sgpr32, 6, implicit-def $scc
    ; MUBUFW64-NEXT: $sgpr4 = S_ADD_I32 killed $sgpr4, 96, implicit-def $scc
    ; MUBUFW64-NEXT: renamable $sgpr7 = S_OR_B32 68, killed $sgpr4, implicit-def $scc
    ; MUBUFW64-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; MUBUFW32-LABEL: name: s_or_b32__literal__fi_offset96
    ; MUBUFW32: $sgpr4 = S_LSHR_B32 $sgpr32, 5, implicit-def $scc
    ; MUBUFW32-NEXT: $sgpr4 = S_ADD_I32 killed $sgpr4, 96, implicit-def $scc
    ; MUBUFW32-NEXT: renamable $sgpr7 = S_OR_B32 68, killed $sgpr4, implicit-def $scc
    ; MUBUFW32-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; FLATSCRW64-LABEL: name: s_or_b32__literal__fi_offset96
    ; FLATSCRW64: $sgpr4 = S_ADD_I32 $sgpr32, 96, implicit-def $scc
    ; FLATSCRW64-NEXT: renamable $sgpr7 = S_OR_B32 68, killed $sgpr4, implicit-def $scc
    ; FLATSCRW64-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; FLATSCRW32-LABEL: name: s_or_b32__literal__fi_offset96
    ; FLATSCRW32: $sgpr4 = S_ADD_I32 $sgpr32, 96, implicit-def $scc
    ; FLATSCRW32-NEXT: renamable $sgpr7 = S_OR_B32 68, killed $sgpr4, implicit-def $scc
    ; FLATSCRW32-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    renamable $sgpr7 = S_OR_B32 68, %stack.1, implicit-def $scc
    SI_RETURN implicit $sgpr7, implicit $scc

...

---
name: s_or_b32__sgpr__fi_literal_offset
tracksRegLiveness: true
stack:
  - { id: 0, size: 80, alignment: 16 }
  - { id: 1, size: 48, alignment: 4 }
machineFunctionInfo:
  scratchRSrcReg:  '$sgpr0_sgpr1_sgpr2_sgpr3'
  frameOffsetReg:  '$sgpr33'
  stackPtrOffsetReg: '$sgpr32'
body:             |
  bb.0:
    liveins: $sgpr8
    ; MUBUFW64-LABEL: name: s_or_b32__sgpr__fi_literal_offset
    ; MUBUFW64: liveins: $sgpr8
    ; MUBUFW64-NEXT: {{  $}}
    ; MUBUFW64-NEXT: $sgpr4 = S_LSHR_B32 $sgpr32, 6, implicit-def $scc
    ; MUBUFW64-NEXT: $sgpr4 = S_ADD_I32 killed $sgpr4, 80, implicit-def $scc
    ; MUBUFW64-NEXT: renamable $sgpr7 = S_OR_B32 $sgpr8, killed $sgpr4, implicit-def $scc
    ; MUBUFW64-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; MUBUFW32-LABEL: name: s_or_b32__sgpr__fi_literal_offset
    ; MUBUFW32: liveins: $sgpr8
    ; MUBUFW32-NEXT: {{  $}}
    ; MUBUFW32-NEXT: $sgpr4 = S_LSHR_B32 $sgpr32, 5, implicit-def $scc
    ; MUBUFW32-NEXT: $sgpr4 = S_ADD_I32 killed $sgpr4, 80, implicit-def $scc
    ; MUBUFW32-NEXT: renamable $sgpr7 = S_OR_B32 $sgpr8, killed $sgpr4, implicit-def $scc
    ; MUBUFW32-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; FLATSCRW64-LABEL: name: s_or_b32__sgpr__fi_literal_offset
    ; FLATSCRW64: liveins: $sgpr8
    ; FLATSCRW64-NEXT: {{  $}}
    ; FLATSCRW64-NEXT: $sgpr4 = S_ADD_I32 $sgpr32, 80, implicit-def $scc
    ; FLATSCRW64-NEXT: renamable $sgpr7 = S_OR_B32 $sgpr8, killed $sgpr4, implicit-def $scc
    ; FLATSCRW64-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; FLATSCRW32-LABEL: name: s_or_b32__sgpr__fi_literal_offset
    ; FLATSCRW32: liveins: $sgpr8
    ; FLATSCRW32-NEXT: {{  $}}
    ; FLATSCRW32-NEXT: $sgpr4 = S_ADD_I32 $sgpr32, 80, implicit-def $scc
    ; FLATSCRW32-NEXT: renamable $sgpr7 = S_OR_B32 $sgpr8, killed $sgpr4, implicit-def $scc
    ; FLATSCRW32-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    renamable $sgpr7 = S_OR_B32 $sgpr8, %stack.1, implicit-def $scc
    SI_RETURN implicit $sgpr7, implicit $scc

...

---
name: s_or_b32__sgpr__fi_inlineimm_offset
tracksRegLiveness: true
stack:
  - { id: 0, size: 32, alignment: 16 }
  - { id: 1, size: 48, alignment: 4 }
machineFunctionInfo:
  scratchRSrcReg:  '$sgpr0_sgpr1_sgpr2_sgpr3'
  frameOffsetReg:  '$sgpr33'
  stackPtrOffsetReg: '$sgpr32'
body:             |
  bb.0:
    liveins: $sgpr8
    ; MUBUFW64-LABEL: name: s_or_b32__sgpr__fi_inlineimm_offset
    ; MUBUFW64: liveins: $sgpr8
    ; MUBUFW64-NEXT: {{  $}}
    ; MUBUFW64-NEXT: $sgpr4 = S_LSHR_B32 $sgpr32, 6, implicit-def $scc
    ; MUBUFW64-NEXT: $sgpr4 = S_ADD_I32 killed $sgpr4, 32, implicit-def $scc
    ; MUBUFW64-NEXT: renamable $sgpr7 = S_OR_B32 $sgpr8, killed $sgpr4, implicit-def $scc
    ; MUBUFW64-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; MUBUFW32-LABEL: name: s_or_b32__sgpr__fi_inlineimm_offset
    ; MUBUFW32: liveins: $sgpr8
    ; MUBUFW32-NEXT: {{  $}}
    ; MUBUFW32-NEXT: $sgpr4 = S_LSHR_B32 $sgpr32, 5, implicit-def $scc
    ; MUBUFW32-NEXT: $sgpr4 = S_ADD_I32 killed $sgpr4, 32, implicit-def $scc
    ; MUBUFW32-NEXT: renamable $sgpr7 = S_OR_B32 $sgpr8, killed $sgpr4, implicit-def $scc
    ; MUBUFW32-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; FLATSCRW64-LABEL: name: s_or_b32__sgpr__fi_inlineimm_offset
    ; FLATSCRW64: liveins: $sgpr8
    ; FLATSCRW64-NEXT: {{  $}}
    ; FLATSCRW64-NEXT: $sgpr4 = S_ADD_I32 $sgpr32, 32, implicit-def $scc
    ; FLATSCRW64-NEXT: renamable $sgpr7 = S_OR_B32 $sgpr8, killed $sgpr4, implicit-def $scc
    ; FLATSCRW64-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; FLATSCRW32-LABEL: name: s_or_b32__sgpr__fi_inlineimm_offset
    ; FLATSCRW32: liveins: $sgpr8
    ; FLATSCRW32-NEXT: {{  $}}
    ; FLATSCRW32-NEXT: $sgpr4 = S_ADD_I32 $sgpr32, 32, implicit-def $scc
    ; FLATSCRW32-NEXT: renamable $sgpr7 = S_OR_B32 $sgpr8, killed $sgpr4, implicit-def $scc
    ; FLATSCRW32-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    renamable $sgpr7 = S_OR_B32 $sgpr8, %stack.1, implicit-def $scc
    SI_RETURN implicit $sgpr7, implicit $scc

...

---
name: s_and_b32__sgpr__fi_literal_offset
tracksRegLiveness: true
stack:
  - { id: 0, size: 80, alignment: 16 }
  - { id: 1, size: 48, alignment: 4 }
machineFunctionInfo:
  scratchRSrcReg:  '$sgpr0_sgpr1_sgpr2_sgpr3'
  frameOffsetReg:  '$sgpr33'
  stackPtrOffsetReg: '$sgpr32'
body:             |
  bb.0:
    liveins: $sgpr8
    ; MUBUFW64-LABEL: name: s_and_b32__sgpr__fi_literal_offset
    ; MUBUFW64: liveins: $sgpr8
    ; MUBUFW64-NEXT: {{  $}}
    ; MUBUFW64-NEXT: $sgpr4 = S_LSHR_B32 $sgpr32, 6, implicit-def $scc
    ; MUBUFW64-NEXT: $sgpr4 = S_ADD_I32 killed $sgpr4, 80, implicit-def $scc
    ; MUBUFW64-NEXT: renamable $sgpr7 = S_AND_B32 $sgpr8, killed $sgpr4, implicit-def $scc
    ; MUBUFW64-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; MUBUFW32-LABEL: name: s_and_b32__sgpr__fi_literal_offset
    ; MUBUFW32: liveins: $sgpr8
    ; MUBUFW32-NEXT: {{  $}}
    ; MUBUFW32-NEXT: $sgpr4 = S_LSHR_B32 $sgpr32, 5, implicit-def $scc
    ; MUBUFW32-NEXT: $sgpr4 = S_ADD_I32 killed $sgpr4, 80, implicit-def $scc
    ; MUBUFW32-NEXT: renamable $sgpr7 = S_AND_B32 $sgpr8, killed $sgpr4, implicit-def $scc
    ; MUBUFW32-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; FLATSCRW64-LABEL: name: s_and_b32__sgpr__fi_literal_offset
    ; FLATSCRW64: liveins: $sgpr8
    ; FLATSCRW64-NEXT: {{  $}}
    ; FLATSCRW64-NEXT: $sgpr4 = S_ADD_I32 $sgpr32, 80, implicit-def $scc
    ; FLATSCRW64-NEXT: renamable $sgpr7 = S_AND_B32 $sgpr8, killed $sgpr4, implicit-def $scc
    ; FLATSCRW64-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    ;
    ; FLATSCRW32-LABEL: name: s_and_b32__sgpr__fi_literal_offset
    ; FLATSCRW32: liveins: $sgpr8
    ; FLATSCRW32-NEXT: {{  $}}
    ; FLATSCRW32-NEXT: $sgpr4 = S_ADD_I32 $sgpr32, 80, implicit-def $scc
    ; FLATSCRW32-NEXT: renamable $sgpr7 = S_AND_B32 $sgpr8, killed $sgpr4, implicit-def $scc
    ; FLATSCRW32-NEXT: SI_RETURN implicit $sgpr7, implicit $scc
    renamable $sgpr7 = S_AND_B32 $sgpr8, %stack.1, implicit-def $scc
    SI_RETURN implicit $sgpr7, implicit $scc

...