@@ -289,16 +289,20 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
289
289
290
290
switch (Opc) {
291
291
case TargetOpcode::G_ADD:
292
- case TargetOpcode::G_SUB: {
292
+ case TargetOpcode::G_SUB:
293
+ case TargetOpcode::G_ANYEXT:
294
+ case TargetOpcode::G_SEXT:
295
+ case TargetOpcode::G_ZEXT: {
293
296
if (MRI.getType (MI.getOperand (0 ).getReg ()).isVector ()) {
294
297
LLT Ty = MRI.getType (MI.getOperand (0 ).getReg ());
295
298
return getInstructionMapping (
296
299
DefaultMappingID, /* Cost=*/ 1 ,
297
300
getVRBValueMapping (Ty.getSizeInBits ().getKnownMinValue ()),
298
301
NumOperands);
299
302
}
303
+ return getInstructionMapping (DefaultMappingID, /* Cost=*/ 1 , GPRValueMapping,
304
+ NumOperands);
300
305
}
301
- LLVM_FALLTHROUGH;
302
306
case TargetOpcode::G_SHL:
303
307
case TargetOpcode::G_ASHR:
304
308
case TargetOpcode::G_LSHR:
@@ -320,9 +324,6 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
320
324
case TargetOpcode::G_PTRTOINT:
321
325
case TargetOpcode::G_INTTOPTR:
322
326
case TargetOpcode::G_TRUNC:
323
- case TargetOpcode::G_ANYEXT:
324
- case TargetOpcode::G_SEXT:
325
- case TargetOpcode::G_ZEXT:
326
327
case TargetOpcode::G_SEXTLOAD:
327
328
case TargetOpcode::G_ZEXTLOAD:
328
329
return getInstructionMapping (DefaultMappingID, /* Cost=*/ 1 , GPRValueMapping,
0 commit comments