[llvm] [RISCV][GISel] Use maskedValueIsZero in RISCVInstructionSelector::selectZExtBits. (PR #115244)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 16:52:48 PST 2024


================
@@ -261,7 +261,9 @@ RISCVInstructionSelector::selectZExtBits(MachineOperand &Root,
     return {{[=](MachineInstrBuilder &MIB) { MIB.addReg(RegX); }}};
   }
 
-  // TODO: Use computeKnownBits.
+  unsigned Size = MRI->getType(RootReg).getSizeInBits();
----------------
topperc wrote:

It should always be a scalar I think. Unless this gets called before any of the type checks in the pattern. But I made the change.

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


More information about the llvm-commits mailing list