Skip to content

Commit 8f260e8

Browse files
committed
fixup! Address review comment
1 parent ba4ef98 commit 8f260e8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,9 +1231,7 @@ bool RISCVLegalizerInfo::legalizeCustom(
12311231
case TargetOpcode::G_ASHR:
12321232
case TargetOpcode::G_LSHR:
12331233
case TargetOpcode::G_SHL: {
1234-
Register AmtReg = MI.getOperand(2).getReg();
1235-
auto VRegAndVal = getIConstantVRegValWithLookThrough(AmtReg, MRI);
1236-
if (VRegAndVal) {
1234+
if (getIConstantVRegValWithLookThrough(MI.getOperand(2).getReg(), MRI)) {
12371235
// We don't need a custom node for shift by constant. Just widen the
12381236
// source and the shift amount.
12391237
unsigned ExtOpc = TargetOpcode::G_ANYEXT;

0 commit comments

Comments
 (0)