[PATCH] D34881: [SLP] Allow vectorization of the instruction from the same basic blocks only, NFC.
Anna Thomas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 28 11:19:35 PDT 2017
anna added inline comments.
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:4771
- if (Root->getParent() != BB)
+ if (Root->getParent() != BB || isa<PHINode>(Root))
Could you please explain why you bail out here? If it's for clamping the number of operands, that'll get operated on the loop below, why not just limit the recursion depth to 6 instead of 12?
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:4825
// Try to vectorize operands.
if (++Level < RecursionMaxDepth)
Please add a comment here explicitly stating that you're limiting this to the same basic block to save compile time.
More information about the llvm-commits