Commit e77246d
authored
[VPlan] Use predicate from VPValue VPWidenSelectR::computeCost. (#172915)
Instead of looking up the predicate from the VPValue condition instead
of the underlying IR.
This improves cost modeling in some cases, e.g. when we can fold
operations like negations in compares. On AArch64, this leads to
additional vectorization in a few cases in practice.
Example lowering for the modified test case:
https://llvm.godbolt.org/z/6nc6jo5eG
PR: #1729151 parent cd13170 commit e77246d
File tree
2 files changed
+6
-7
lines changed- llvm
- lib/Transforms/Vectorize
- test/Transforms/LoopVectorize/AArch64
2 files changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1964 | 1964 | | |
1965 | 1965 | | |
1966 | 1966 | | |
1967 | | - | |
1968 | | - | |
1969 | | - | |
| 1967 | + | |
| 1968 | + | |
1970 | 1969 | | |
1971 | 1970 | | |
1972 | 1971 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
0 commit comments