[llvm] [RISCV] Support vp.{gather,scatter} in RISCVGatherScatterLowering (PR #122232)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 20:06:52 PST 2025


================
@@ -483,12 +482,50 @@ RISCVGatherScatterLowering::determineBaseAndStride(Instruction *Ptr,
   return P;
 }
 
-bool RISCVGatherScatterLowering::tryCreateStridedLoadStore(IntrinsicInst *II,
-                                                           Type *DataType,
-                                                           Value *Ptr,
-                                                           Value *AlignOp) {
+bool RISCVGatherScatterLowering::tryCreateStridedLoadStore(IntrinsicInst *II) {
+  VectorType *DataType;
+  Value *StoreVal, *Ptr, *Mask, *EVL;
+  MaybeAlign MA;
+  switch (II->getIntrinsicID()) {
+  case Intrinsic::masked_gather:
+    DataType = cast<VectorType>(II->getType());
+    StoreVal = nullptr;
----------------
wangpc-pp wrote:

Move assignments of `nullptr` to the declarations?

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


More information about the llvm-commits mailing list