@@ -93,9 +93,6 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST,
93
93
94
94
setAction ({G_BRCOND, S1}, Legal);
95
95
96
- setAction ({G_ASHR, S32}, Legal);
97
- setAction ({G_ASHR, 1 , S32}, Legal);
98
-
99
96
getActionDefinitionsBuilder ({G_ADD, G_SUB, G_MUL, G_UMULH, G_SMULH})
100
97
.legalFor ({S32})
101
98
.scalarize (0 );
@@ -186,6 +183,14 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST,
186
183
setAction ({G_GEP, 1 , IdxTy}, Legal);
187
184
}
188
185
186
+ // FIXME: When RegBankSelect inserts copies, it will only create new registers
187
+ // with scalar types. This means we can end up with G_LOAD/G_STORE/G_GEP
188
+ // instruction with scalar types for their pointer operands. In assert builds,
189
+ // the instruction selector will assert if it sees a generic instruction which
190
+ // isn't legal, so we need to tell it that scalar types are legal for pointer
191
+ // operands
192
+ setAction ({G_GEP, S64}, Legal);
193
+
189
194
setAction ({G_BLOCK_ADDR, CodePtr}, Legal);
190
195
191
196
getActionDefinitionsBuilder ({G_ICMP, G_FCMP})
@@ -288,14 +293,6 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST,
288
293
Shifts.clampScalar (0 , S32, S64);
289
294
Shifts.clampScalar (1 , S32, S32);
290
295
291
- // FIXME: When RegBankSelect inserts copies, it will only create new
292
- // registers with scalar types. This means we can end up with
293
- // G_LOAD/G_STORE/G_GEP instruction with scalar types for their pointer
294
- // operands. In assert builds, the instruction selector will assert
295
- // if it sees a generic instruction which isn't legal, so we need to
296
- // tell it that scalar types are legal for pointer operands
297
- setAction ({G_GEP, S64}, Legal);
298
-
299
296
for (unsigned Op : {G_EXTRACT_VECTOR_ELT, G_INSERT_VECTOR_ELT}) {
300
297
unsigned VecTypeIdx = Op == G_EXTRACT_VECTOR_ELT ? 1 : 0 ;
301
298
unsigned EltTypeIdx = Op == G_EXTRACT_VECTOR_ELT ? 0 : 1 ;
0 commit comments