The test case to show not quite optimal SLP vectorization.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The test filename is vectorize-pair-path.ll, but the description says that this test is about root selection, so perhaps rename it to something like root-selection.ll? The impression I am getting from the current name is that this test is about the path followed by buildTreeRec().
llvm/test/Transforms/SLPVectorizer/X86/vectorize-pair-path.ll | ||
---|---|---|
7 | Please explain briefly in a comment which roots should be selected instead of the current ones. | |
8 | Nit: perhaps a more relevant function name, like root_selection or something similar. |
llvm/test/Transforms/SLPVectorizer/X86/vectorize-pair-path.ll | ||
---|---|---|
7 | Here we start trying to vectorize reduction but end up in tryToVectorize() method which then makes several attempts of finding something that can be vectorized. |
LG
llvm/test/Transforms/SLPVectorizer/X86/vectorize-pair-path.ll | ||
---|---|---|
7 | Sounds good, please add some of this text in the test so that whoever reads it knows what it is about. |
llvm/test/Transforms/SLPVectorizer/X86/vectorize-pair-path.ll | ||
---|---|---|
7 | Thank you. I added description to make its purpose clearer. |
llvm/test/Transforms/SLPVectorizer/X86/vectorize-pair-path.ll | ||
---|---|---|
49 | Why are there undef float-ops? Is this the only way to expose the issue? If you run this through opt -O3 all you get is a posion result. |
llvm/test/Transforms/SLPVectorizer/X86/vectorize-pair-path.ll | ||
---|---|---|
49 | It is ok for SLP to have some undefs unless you do not use instcombine. You can treat undef here as a specific op kind, different from others. Just to reduce the size of the test. |
llvm/test/Transforms/SLPVectorizer/X86/vectorize-pair-path.ll | ||
---|---|---|
49 | Yeah, this shouldn't go through instcombine. There were even more undefs after bugpoint reduced the original case so I had to step beck a bit and replaced some with FP constants to make tracing SLP vectorizer behavior easier. |
llvm/test/Transforms/SLPVectorizer/X86/vectorize-pair-path.ll | ||
---|---|---|
49 | typo: back (not "beck") |
Please explain briefly in a comment which roots should be selected instead of the current ones.