[PATCH] D100816: [AArch64][SVE] Lower index_vector to step_vector

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 27 05:07:47 PDT 2021


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:13643
+    SDValue StepVector =
+        DAG.getNode(ISD::STEP_VECTOR, DL, N->getValueType(0), One);
+    SDValue Step = DAG.getNode(ISD::SPLAT_VECTOR, DL, N->getValueType(0), Op2);
----------------
You should be able to use Op2 directly and thus remove the need for the `SPLAT_VECTOR` and `MUL`.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:13650
+  } else
+    return DAG.getNode(AArch64ISD::INDEX_VECTOR, DL, N->getValueType(0), Op1,
+                       Op2);
----------------
Is this a phased the rollout?  As in I'm assuming that this will ultimately be expressed in terms of `STEP_VECTOR` as well.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:15430-15431
+         "Only expect scalable vectors for STEP_VECTOR");
+  assert(VT.getScalarType() != MVT::i1 &&
+         "Vectors of i1 types not supported for STEP_VECTOR");
+
----------------
This is already a requirement for the node and asserted with `getNode()` so doesn't need to be duplicated here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100816



More information about the llvm-commits mailing list