add a test to check for gep vectorization after the change from D144128 where the gep vectorization is dependant on the target hook prefersVectorizedAddressing()
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Looks like the test is failing in the precommit checks.
| llvm/test/Transforms/SLPVectorizer/AArch64/getelementptr.ll | ||
|---|---|---|
| 6 | Why is the new run line needed? | |
| llvm/test/Transforms/SLPVectorizer/AArch64/vector-getelementptr.ll | ||
|---|---|---|
| 2 ↗ | (On Diff #507403) | this is missing an AArch64 triple, you need to add something like -mtriple=arm64-apple-ios. |
| 4 ↗ | (On Diff #507403) | Please add a description to the test. The key issue is that it requires a vector GEP + extracts, but the cost is offset by being able to efficiently vectorize the rest of the tree. |
| 43 ↗ | (On Diff #507403) | please don't use null in the test. e.g. loading from null like the test does is UB. |
rename variables, change ptr from null to function argument and specify the mtriple for opt
| llvm/test/Transforms/SLPVectorizer/AArch64/getelementptr.ll | ||
|---|---|---|
| 6 | because -slp-threshold=-7 forces the test to vectorize I guess maybe it modifies the cost model? | |
LGTM, thanks. Just a few bits that would be good to address before landing
| llvm/test/Transforms/SLPVectorizer/AArch64/vector-getelementptr.ll | ||
|---|---|---|
| 3 ↗ | (On Diff #508635) | Move this directly to the test definition, with a newline between comment and run line |
| 5 ↗ | (On Diff #508635) | More consistent to use base3 instead of base_gep? All bases are used with geps |
| 65 ↗ | (On Diff #508635) | It would be more compact to use gep instead of get elementary in the names. |
Why is the new run line needed?