[llvm] [RISCV][GISEL] instruction-select vmclr (PR #110782)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 20:27:46 PDT 2024
================
@@ -379,6 +381,26 @@ RISCVInstructionSelector::selectSHXADD_UWOp(MachineOperand &Root,
return std::nullopt;
}
+InstructionSelector::ComplexRendererFns
+RISCVInstructionSelector::selectVLOp(MachineOperand &Root) const {
+ MachineRegisterInfo &MRI =
+ Root.getParent()->getParent()->getParent()->getRegInfo();
+ assert(Root.isReg() && "Expected operand to be a Register");
+ MachineInstr *RootDef = MRI.getVRegDef(Root.getReg());
+
+ if (RootDef->getOpcode() == TargetOpcode::G_CONSTANT &&
+ RootDef->getOperand(1).getCImm()->getSExtValue() == RISCV::VLMaxSentinel)
----------------
topperc wrote:
This actually shouldn't be VLMaxSentinel. If should be `RootDef->getOperand(1).getCImm()->isAllOnesValue()`
https://github.com/llvm/llvm-project/pull/110782
More information about the llvm-commits
mailing list