The bug is related to aggregate build cost model adjustment that
adds a bias to cost triggering vectorization of actually unprofitable
to vectorize tree.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Please regenerate the tests with update_test_checks.py
Also, drop the "slp_" - its already in the slp test directory tree
llvm/test/Transforms/SLPVectorizer/X86/slp_vec_list_bias.ll | ||
---|---|---|
63 ↗ | (On Diff #266712) | ret void |
llvm/test/Transforms/SLPVectorizer/X86/slp_vec_list_bias.ll | ||
---|---|---|
1 ↗ | (On Diff #266712) | Does "-tti" change the behavior? |
8 ↗ | (On Diff #266712) | As suggested, if you auto-generate the CHECK lines using utils/update_test_checks.py, the test will show the full results. Warning - you should probably do something like "s/tmp/t/" to avoid problems with the script (see D80584). It would also be nice to add a comment about the x86-specific asm that we want to avoid here ("vpaddd" or similar). There are later transforms in -vector-combine and DAGCombiner that could scalarize and solve this, but if we can fix the problem within SLP, then that's obviously better. |
LGTM - see inline for typo in comment.
llvm/test/Transforms/SLPVectorizer/X86/vec_list_bias.ll | ||
---|---|---|
7 | typo: subtracting? |
llvm/test/Transforms/SLPVectorizer/X86/vec_list_bias.ll | ||
---|---|---|
7 | Thank you, Sanjay. I fixed it. |
typo: subtracting?