File tree Expand file tree Collapse file tree 2 files changed +51
-49
lines changed Expand file tree Collapse file tree 2 files changed +51
-49
lines changed Original file line number Diff line number Diff line change @@ -1047,6 +1047,11 @@ void SIFoldOperandsImpl::foldOperand(
1047
1047
if (MovOp == AMDGPU::COPY)
1048
1048
return ;
1049
1049
1050
+ // Check if the destination register of the MOV operation belongs
1051
+ // to a vector superclass. Folding would be illegal.
1052
+ if (TRI->isVectorSuperClass (DestRC))
1053
+ return ;
1054
+
1050
1055
MachineInstr::mop_iterator ImpOpI = UseMI->implicit_operands ().begin ();
1051
1056
MachineInstr::mop_iterator ImpOpE = UseMI->implicit_operands ().end ();
1052
1057
while (ImpOpI != ImpOpE) {
Original file line number Diff line number Diff line change @@ -185,52 +185,49 @@ body: |
185
185
186
186
...
187
187
188
- # FIXME: Register class restrictions of av register not respected,
189
- # issue 130020
190
-
191
- # ---
192
- # name: s_mov_b32_inlineimm_copy_s_to_av_32
193
- # tracksRegLiveness: true
194
- # body: |
195
- # bb.0:
196
- # %0:sreg_32 = S_MOV_B32 32
197
- # %1:av_32 = COPY %0
198
- # $agpr0 = COPY %1
199
- # S_ENDPGM 0
200
-
201
- # ...
202
-
203
- # ---
204
- # name: v_mov_b32_inlineimm_copy_v_to_av_32
205
- # tracksRegLiveness: true
206
- # body: |
207
- # bb.0:
208
- # %0:vgpr_32 = V_MOV_B32_e32 32, implicit $exec
209
- # %1:av_32 = COPY %0
210
- # $agpr0 = COPY %1
211
- # S_ENDPGM 0
212
- # ...
213
-
214
- # ---
215
- # name: s_mov_b32_imm_literal_copy_s_to_av_32
216
- # tracksRegLiveness: true
217
- # body: |
218
- # bb.0:
219
- # %0:sreg_32 = S_MOV_B32 999
220
- # %1:av_32 = COPY %0
221
- # $agpr0 = COPY %1
222
- # S_ENDPGM 0
223
-
224
- # ...
225
-
226
- # ---
227
- # name: v_mov_b32_imm_literal_copy_v_to_av_32
228
- # tracksRegLiveness: true
229
- # body: |
230
- # bb.0:
231
- # %0:vgpr_32 = V_MOV_B32_e32 999, implicit $exec
232
- # %1:av_32 = COPY %0
233
- # $agpr0 = COPY %1
234
- # S_ENDPGM 0
235
-
236
- # ...
188
+ ---
189
+ name : s_mov_b32_inlineimm_copy_s_to_av_32
190
+ tracksRegLiveness : true
191
+ body : |
192
+ bb.0:
193
+ %0:sreg_32 = S_MOV_B32 32
194
+ %1:av_32 = COPY %0
195
+ $agpr0 = COPY %1
196
+ S_ENDPGM 0
197
+
198
+ ...
199
+
200
+ ---
201
+ name : v_mov_b32_inlineimm_copy_v_to_av_32
202
+ tracksRegLiveness : true
203
+ body : |
204
+ bb.0 :
205
+ %0:vgpr_32 = V_MOV_B32_e32 32, implicit $exec
206
+ %1:av_32 = COPY %0
207
+ $agpr0 = COPY %1
208
+ S_ENDPGM 0
209
+ ...
210
+
211
+ ---
212
+ name : s_mov_b32_imm_literal_copy_s_to_av_32
213
+ tracksRegLiveness : true
214
+ body : |
215
+ bb.0:
216
+ %0:sreg_32 = S_MOV_B32 999
217
+ %1:av_32 = COPY %0
218
+ $agpr0 = COPY %1
219
+ S_ENDPGM 0
220
+
221
+ ...
222
+
223
+ ---
224
+ name : v_mov_b32_imm_literal_copy_v_to_av_32
225
+ tracksRegLiveness : true
226
+ body : |
227
+ bb.0:
228
+ %0:vgpr_32 = V_MOV_B32_e32 999, implicit $exec
229
+ %1:av_32 = COPY %0
230
+ $agpr0 = COPY %1
231
+ S_ENDPGM 0
232
+
233
+ ...
You can’t perform that action at this time.
0 commit comments