[llvm] [WIP][GISel][RISCV] Implement selectShiftMask. (PR #77572)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 02:01:38 PST 2024


================
@@ -159,9 +159,55 @@ RISCVInstructionSelector::RISCVInstructionSelector(
 
 InstructionSelector::ComplexRendererFns
 RISCVInstructionSelector::selectShiftMask(MachineOperand &Root) const {
-  // TODO: Also check if we are seeing the result of an AND operation which
-  // could be bypassed since we only check the lower log2(xlen) bits.
-  return {{[=](MachineInstrBuilder &MIB) { MIB.add(Root); }}};
+  // TODO: ShiftWidth can be 64.
+  unsigned ShiftWidth = 32;
+
+  using namespace llvm::MIPatternMatch;
+  MachineFunction &MF = *Root.getParent()->getParent()->getParent();
----------------
arsenm wrote:

This should already be available in the base class 

https://github.com/llvm/llvm-project/pull/77572


More information about the llvm-commits mailing list