[llvm] [RISCV] Match strided vector bases in RISCVGatherScatterLowering (PR #93972)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 09:29:47 PDT 2024


================
@@ -349,6 +349,22 @@ RISCVGatherScatterLowering::determineBaseAndStride(Instruction *Ptr,
 
   SmallVector<Value *, 2> Ops(GEP->operands());
 
+  // If the base pointer is a vector, check if it's strided.
+  if (GEP->getPointerOperand()->getType()->isVectorTy()) {
+    auto [BaseBase, Stride] = determineBaseAndStride(
+        cast<Instruction>(GEP->getPointerOperand()), Builder);
----------------
mshockwave wrote:

this might be pedantic, but where did we check if the pointer operand is an instruction. 

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


More information about the llvm-commits mailing list