diff options
author | Kerry McLaughlin <kerry.mclaughlin@arm.com> | 2021-02-16 10:43:42 +0000 |
---|---|---|
committer | Kerry McLaughlin <kerry.mclaughlin@arm.com> | 2021-02-16 13:50:06 +0000 |
commit | ba1e150d03cac7629111a90eea1f2d727e465983 (patch) | |
tree | f46873c8017e4842f390776f88b3a9d263917a13 /clang/unittests/Frontend/CompilerInvocationTest.cpp | |
parent | 32389346ed83e14b7a9bd3a31a96181c6a1cdb5e (diff) | |
download | llvm-ba1e150d03cac7629111a90eea1f2d727e465983.zip llvm-ba1e150d03cac7629111a90eea1f2d727e465983.tar.gz llvm-ba1e150d03cac7629111a90eea1f2d727e465983.tar.bz2 |
[SVE] Add support for scalable vectorization of loops with int/fast FP reductions
This patch enables scalable vectorization of loops with integer/fast reductions, e.g:
```
unsigned sum = 0;
for (int i = 0; i < n; ++i) {
sum += a[i];
}
```
A new TTI interface, isLegalToVectorizeReduction, has been added to prevent
reductions which are not supported for scalable types from vectorizing.
If the reduction is not supported for a given scalable VF,
computeFeasibleMaxVF will fall back to using fixed-width vectorization.
Reviewed By: david-arm, fhahn, dmgreen
Differential Revision: https://reviews.llvm.org/D95245
Diffstat (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp')
0 files changed, 0 insertions, 0 deletions