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

David Truby via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 03:23:01 PDT 2022


DavidTruby added a comment.

I think the commit message needs to be more clear: my understanding from the IR is that you're not _always_ narrowing a gather's index if it's 64 bits, just if it was extended from < 32 to 64 and hence could trivially have been extended to 32 instead? I think the commit message needs to reflect that.



================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:17671-17672
                                      SelectionDAG &DAG) {
+  if (Index.getOpcode() == ISD::ZERO_EXTEND) {
+    if (tryNarrowZExtGatherIndex(N, Index, DAG))
+      return true;
----------------
Could you just have the following and remove one level of nesting?

```
if (Index.getOpcode() == ISD::ZERO_EXTEND && tryNarrowZExtGatherIndex(N, Index, DAG))
  return true;
```


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