[PATCH] D130692: [AArch64][SVE] Narrow 64bit gather index to 32bit

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 10:33:08 PDT 2022


paulwalker-arm added a comment.

Please can you also add the equivalent `SIGN_EXTEND` case.



================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:17652
 
+bool tryNarrowZExtGatherIndex(const SDNode *N, SDValue &Index,
+                              SelectionDAG &DAG) {
----------------
I'll reserve judgement but it doesn't really seem worth breaking thus out into a separate function.

You do need to ensure `N` is treating `Index` as unsigned before you can shrink the extend.  MaskedGatherScatterSDNode has a function to query this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130692



More information about the llvm-commits mailing list