Commit b2f2383
committed
[SCEV][LV] Add Stride equal to one Predicate to enable strided access versioning
This commit enable the vectorization for the case from
#71517.
float s172(int xa, int xb) {
for (int i = xa - 1; i < 32000; i += xb)
a[i] += b[i];
}
By assuming the stride as one and generating the runtime checking to guard
the vectorized loop, it seems the case can be vectorized.1 parent 18fab95 commit b2f2383
File tree
2 files changed
+19
-2
lines changed- llvm
- lib/Analysis
- test/Transforms/LoopVectorize
2 files changed
+19
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12778 | 12778 | | |
12779 | 12779 | | |
12780 | 12780 | | |
12781 | | - | |
| 12781 | + | |
12782 | 12782 | | |
12783 | 12783 | | |
12784 | 12784 | | |
| 12785 | + | |
| 12786 | + | |
| 12787 | + | |
| 12788 | + | |
| 12789 | + | |
| 12790 | + | |
| 12791 | + | |
| 12792 | + | |
| 12793 | + | |
| 12794 | + | |
| 12795 | + | |
| 12796 | + | |
| 12797 | + | |
12785 | 12798 | | |
12786 | 12799 | | |
12787 | 12800 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | | - | |
| 100 | + | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| |||
0 commit comments