When rooted with PHIs, a vectorization tree may have another node with PHIs
which have roots as their operands. We cannot ignore ordering information
for root in such a case.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | ||
---|---|---|
4395–4398 | This was the very first thing I was considering. But call to the method is from outside of BoUpSLP. It means we either need to allow access to VectorizaableTree data or add a public method that checks just that. | |
llvm/test/Transforms/SLPVectorizer/X86/reorder-phi-operand.ll | ||
87 | It fails with assertion without the fix. It represents a stability issue. |
llvm/test/Transforms/SLPVectorizer/X86/reorder-phi-operand.ll | ||
---|---|---|
87 | Ah, I see |
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | ||
---|---|---|
4395–4398 | I can add this method and use it instead: bool isRootHasInTreeUses() const { return !VectorizableTree.empty() && !VectorizableTree.front()->UserTreeIndices.empty(); } Thoughts? |
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | ||
---|---|---|
4395–4398 | Go ahead with it. |
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | ||
---|---|---|
1041 | doesRootHave.... |
doesRootHave....