Skip to content

Commit a10c060

Browse files
fixup! remove check for sentinel
1 parent d738b68 commit a10c060

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,10 @@ RISCVInstructionSelector::selectVLOp(MachineOperand &Root) const {
387387

388388
if (RootDef->getOpcode() == TargetOpcode::G_CONSTANT) {
389389
auto C = RootDef->getOperand(1).getCImm();
390-
if (C->getSExtValue() == RISCV::VLMaxSentinel || C->getValue().isAllOnes())
391-
// If the operand is a G_CONSTANT with value VLMaxSentinel or all ones,
392-
// convert it to an immediate with value VLMaxSentinel. This is recognized
393-
// specially by the vsetvli insertion pass.
390+
if (C->getValue().isAllOnes())
391+
// If the operand is a G_CONSTANT with value of all ones it is larger than
392+
// VLMAX. We convert it to an immediate with value VLMaxSentinel. This is
393+
// recognized specially by the vsetvli insertion pass.
394394
return {{[=](MachineInstrBuilder &MIB) {
395395
MIB.addImm(RISCV::VLMaxSentinel);
396396
}}};

0 commit comments

Comments
 (0)