[PATCH] D93050: [SVE][CodeGen] Lower scalable floating-point vector reductions
Cameron McInally via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 13:29:28 PST 2020
cameron.mcinally added a comment.
LGTM with one nit below...
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:16820
+ if (SrcVT.isScalableVector() && SrcVT.isFloatingPoint())
+ RdxVT = SrcVT;
----------------
Nit: We could conditionally avoid the call to `getPackedSVEVectorVT(...)` by inverting this condition and initial value of RdxVT. Something like:
```
EVT RdxVT = SrcVT;
if (SrcVT.isFixedVector() || SrcVT.isInteger())
RdxVT = getPackedSVEVectorVT(ResVT);
```
I also wonder if we need the `isFloatingPoint()/isInteger()` check at all. Is just `isScalableVector()` enough?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93050/new/
https://reviews.llvm.org/D93050
More information about the llvm-commits
mailing list