Skip to content

Commit 7e2a1d6

Browse files
committed
[RISCV] Remove G_TRUNC/ZEXT/SEXT/ANYEXT from the first switch in RISCVRegisterBankInfo::getInstrMapping.
This removes the special case for vectors. The default case in the second switch can handle GPR in addition to vectors. We just won't use the static ValueMapping entry.
1 parent ef5a710 commit 7e2a1d6

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

llvm/lib/Target/RISCV/GISel/RISCVRegisterBankInfo.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -320,20 +320,10 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
320320
case TargetOpcode::G_PTR_ADD:
321321
case TargetOpcode::G_PTRTOINT:
322322
case TargetOpcode::G_INTTOPTR:
323-
case TargetOpcode::G_TRUNC:
324323
case TargetOpcode::G_SEXTLOAD:
325324
case TargetOpcode::G_ZEXTLOAD:
326325
return getInstructionMapping(DefaultMappingID, /*Cost=*/1, GPRValueMapping,
327326
NumOperands);
328-
case TargetOpcode::G_ANYEXT:
329-
case TargetOpcode::G_SEXT:
330-
case TargetOpcode::G_ZEXT: {
331-
// Handle vector extends in the default case below.
332-
if (MRI.getType(MI.getOperand(0).getReg()).isVector())
333-
break;
334-
return getInstructionMapping(DefaultMappingID, /*Cost=*/1, GPRValueMapping,
335-
NumOperands);
336-
}
337327
case TargetOpcode::G_FADD:
338328
case TargetOpcode::G_FSUB:
339329
case TargetOpcode::G_FMUL:

0 commit comments

Comments
 (0)