Commit f2e0f08
committed
[AArch64] Add MATCH loops to LoopIdiomVectorizePass
This patch adds a new loop to LoopIdiomVectorizePass, enabling it to
recognise and use @llvm.experimental.vector.match to vectorise loops
such as:
char* find_first_of(char *first, char *last,
char *s_first, char *s_last) {
for (; first != last; ++first)
for (char *it = s_first; it != s_last; ++it)
if (*first == *it)
return first;
return last;
}
These loops match the C++ standard library's std::find_first_of.1 parent 46f43b6 commit f2e0f08
File tree
4 files changed
+559
-10
lines changed- llvm
- include/llvm/Analysis
- lib
- Target/AArch64
- Transforms/Vectorize
- test/CodeGen/AArch64
4 files changed
+559
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
778 | | - | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
779 | 781 | | |
780 | 782 | | |
781 | 783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
914 | 914 | | |
915 | 915 | | |
916 | 916 | | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
917 | 934 | | |
918 | 935 | | |
919 | 936 | | |
| |||
0 commit comments