Commit 5d30383
committed
[LV] Check for hoisted safe-div selects in planContainsAdditionalSimp.
In some cases, safe-divisor selects can be hoisted out of the vector
loop. Catching all cases in the legacy cost model isn't possible, in
particular checking if all conditions guarding a division are loop
invariant.
Instead, check in planContainsAdditionalSimplifications if there are any
hoisted safe-divisor selects. If so, don't compare to the more
inaccurate legacy cost model.
Fixes llvm#160354.
Fixes llvm#160356.
(cherry picked from commit 88aab08)1 parent e89fd9a commit 5d30383
File tree
2 files changed
+285
-194
lines changed- llvm
- lib/Transforms/Vectorize
- test/Transforms/LoopVectorize/AArch64
2 files changed
+285
-194
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3053 | 3053 | | |
3054 | 3054 | | |
3055 | 3055 | | |
3056 | | - | |
3057 | | - | |
3058 | | - | |
3059 | | - | |
3060 | | - | |
3061 | | - | |
3062 | | - | |
3063 | | - | |
3064 | | - | |
| 3056 | + | |
| 3057 | + | |
| 3058 | + | |
| 3059 | + | |
| 3060 | + | |
| 3061 | + | |
3065 | 3062 | | |
3066 | 3063 | | |
3067 | 3064 | | |
| |||
6932 | 6929 | | |
6933 | 6930 | | |
6934 | 6931 | | |
| 6932 | + | |
| 6933 | + | |
| 6934 | + | |
| 6935 | + | |
| 6936 | + | |
| 6937 | + | |
| 6938 | + | |
| 6939 | + | |
| 6940 | + | |
| 6941 | + | |
| 6942 | + | |
| 6943 | + | |
| 6944 | + | |
| 6945 | + | |
| 6946 | + | |
| 6947 | + | |
| 6948 | + | |
| 6949 | + | |
| 6950 | + | |
| 6951 | + | |
| 6952 | + | |
| 6953 | + | |
6935 | 6954 | | |
6936 | 6955 | | |
6937 | 6956 | | |
| |||
0 commit comments