We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba4ef98 commit 8f260e8Copy full SHA for 8f260e8
llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
@@ -1231,9 +1231,7 @@ bool RISCVLegalizerInfo::legalizeCustom(
1231
case TargetOpcode::G_ASHR:
1232
case TargetOpcode::G_LSHR:
1233
case TargetOpcode::G_SHL: {
1234
- Register AmtReg = MI.getOperand(2).getReg();
1235
- auto VRegAndVal = getIConstantVRegValWithLookThrough(AmtReg, MRI);
1236
- if (VRegAndVal) {
+ if (getIConstantVRegValWithLookThrough(MI.getOperand(2).getReg(), MRI)) {
1237
// We don't need a custom node for shift by constant. Just widen the
1238
// source and the shift amount.
1239
unsigned ExtOpc = TargetOpcode::G_ANYEXT;
0 commit comments