[PATCH] D93132: [SVE][CodeGen] Vector + immediate addressing mode for masked gather/scatter

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 08:32:20 PST 2020


david-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:3924
+    std::swap(BasePtr, Index);
+    Opcode = NewOp;
+    return;
----------------
david-arm wrote:
> If the Offset is not a constant splat should we be using the IMM form here?
Ignore my comment above! We use the IMM form here because baseptr is NULL, and when swapping the operands we will use the form of gather/scatter that takes a vector of pointers.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:3931
+  if (OffsetVal % ScalarSizeInBytes || OffsetVal / ScalarSizeInBytes > 31)
+    return;
+
----------------
I think we can probably improve this a little here by adding:

  BasePtr = SplatVal;
  Index = Index->getOperand(0);

just before the return, since we do have a splat that could live in a scalar register.


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

https://reviews.llvm.org/D93132



More information about the llvm-commits mailing list