[PATCH] D117900: [AArch64][SVE] Fold gather/scatter with 32bits when possible

Caroline via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 28 06:43:11 PST 2022


CarolineConcatto added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:16119
+      return false;
+    Stride = C->getSExtValue();
+    if (auto Offset = DAG.getSplatValue(Index.getOperand(0))) {
----------------
sdesmalen wrote:
> sdesmalen wrote:
> > `Stride` should //only// be set if `Offset` is a splat value, otherwise the return value is incorrect.
> Stride should only be set in the block below (under `if (auto Offset = DAG.getSplatValue(Index.getOperand(0)))` because otherwise the function returns `true` (Stride != 0), but `BasePtr` will be undefined.
Very good catch! Thank you Sander


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117900



More information about the llvm-commits mailing list