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
Event Timeline
Looks like the test is failing in the precommit checks.
llvm/test/Transforms/SLPVectorizer/AArch64/getelementptr.ll | ||
---|---|---|
6 ↗ | (On Diff #507017) | Why is the new run line needed? |
llvm/test/Transforms/SLPVectorizer/AArch64/vector-getelementptr.ll | ||
---|---|---|
3 | this is missing an AArch64 triple, you need to add something like -mtriple=arm64-apple-ios. | |
5 | 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. | |
44 | 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 ↗ | (On Diff #507017) | 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 | ||
---|---|---|
4 | Move this directly to the test definition, with a newline between comment and run line | |
6 | More consistent to use base3 instead of base_gep? All bases are used with geps | |
66 | It would be more compact to use gep instead of get elementary in the names. |
this is missing an AArch64 triple, you need to add something like -mtriple=arm64-apple-ios.