diff options
author | Dinar Temirbulatov <Dinar.Temirbulatov@arm.com> | 2024-07-15 20:21:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-15 20:21:50 +0100 |
commit | 31d4c9750694fa3728e45cbd6f740063ee19a6fa (patch) | |
tree | d4875280aadfe21912fbfd733bd5ea966dc93307 /clang-tools-extra/clang-tidy/boost/UseRangesCheck.cpp | |
parent | 4797036fdbbe5d90e8639a0506fdcf9385d370d8 (diff) | |
download | llvm-31d4c9750694fa3728e45cbd6f740063ee19a6fa.zip llvm-31d4c9750694fa3728e45cbd6f740063ee19a6fa.tar.gz llvm-31d4c9750694fa3728e45cbd6f740063ee19a6fa.tar.bz2 |
[LoopVectorize] LLVM fails to vectorise loops with multi-bool varables (#89226)
This change allows to consider compare instructions in the loop with
multiple use inside the loop and outside.
This change allows to vectorise this loop:
int foo(float* a, int n) {
_Bool any = 0;
_Bool all = 1;
for (int i = 0; i < n; i++) {
if (a[i] < 0.0f) {
any = 1;
} else {
all = 0;
}
}
return all ? 1 : any ? 2 : 3;
}
Diffstat (limited to 'clang-tools-extra/clang-tidy/boost/UseRangesCheck.cpp')
0 files changed, 0 insertions, 0 deletions