[llvm] [RISCV] Narrow indices to e16 for LMUL > 1 when lowering vector_reverse (PR #104427)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 15 05:40:24 PDT 2024


================
@@ -10348,6 +10346,14 @@ SDValue RISCVTargetLowering::lowerVECTOR_REVERSE(SDValue Op,
     GatherOpc = RISCVISD::VRGATHEREI16_VV_VL;
   }
 
+  // At LMUL > 1, do the index computation in 16 bits to reduce register
+  // pressure.
+  if (IntVT.getScalarType().bitsGT(MVT::i16) && isUInt<16>(MaxVLMAX - 1) &&
----------------
lukel97 wrote:

Good point. I think we can also remove it from the check added in #66291 then

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


More information about the llvm-commits mailing list