[PATCH] D108324: [RISCV] Reduce duplicate code for calling SimplifyDemandedBits.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 18 12:44:45 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:6092
   case RISCVISD::UNSHFL: {
-    // Only the lower log2(Bitwidth) bits of the the shift amount are read.
-    SDValue ShAmt = N->getOperand(1);
-    unsigned BitWidth = ShAmt.getValueSizeInBits();
+    // Only the lower log2(Bitwidth)-1 bits of the the shift amount are read.
+    unsigned BitWidth = N->getOperand(1).getValueSizeInBits();
----------------
This comment was incorrect before


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:6102
   case RISCVISD::UNSHFLW: {
-    // Only the lower 32 bits of LHS and lower 5 bits of RHS are read.
+    // Only the lower 32 bits of LHS and lower 4 bits of RHS are read.
     SDValue LHS = N->getOperand(0);
----------------
As was this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108324/new/

https://reviews.llvm.org/D108324



More information about the llvm-commits mailing list