forked from OSchip/llvm-project
GlobalISel: Support G_(S|U)REM widening in LegalizerHelper
Treat widening G_SREM and G_UREM the same as G_SDIV and G_UDIV. This is going to be used in the ARM backend (and that's when the test will come too). llvm-svn: 308278
This commit is contained in:
parent
7f633dfe99
commit
df4100b3d2
|
@ -433,9 +433,12 @@ LegalizerHelper::widenScalar(MachineInstr &MI, unsigned TypeIdx, LLT WideTy) {
|
|||
}
|
||||
case TargetOpcode::G_SDIV:
|
||||
case TargetOpcode::G_UDIV:
|
||||
case TargetOpcode::G_SREM:
|
||||
case TargetOpcode::G_UREM:
|
||||
case TargetOpcode::G_ASHR:
|
||||
case TargetOpcode::G_LSHR: {
|
||||
unsigned ExtOp = MI.getOpcode() == TargetOpcode::G_SDIV ||
|
||||
MI.getOpcode() == TargetOpcode::G_SREM ||
|
||||
MI.getOpcode() == TargetOpcode::G_ASHR
|
||||
? TargetOpcode::G_SEXT
|
||||
: TargetOpcode::G_ZEXT;
|
||||
|
|
Loading…
Reference in New Issue