[all-commits] [llvm/llvm-project] d723ec: [SLP][NFC] Assert that tree entry operands complet...
Valery Dmitriev via All-commits
all-commits at lists.llvm.org
Fri Feb 28 10:36:11 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: d723ec4f04033454e804b044137cf5e4a55dbbea
https://github.com/llvm/llvm-project/commit/d723ec4f04033454e804b044137cf5e4a55dbbea
Author: Valery N Dmitriev <valery.n.dmitriev at intel.com>
Date: 2020-02-28 (Fri, 28 Feb 2020)
Changed paths:
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Log Message:
-----------
[SLP][NFC] Assert that tree entry operands completed when scheduler looks for dependencies.
This change adds an assertion to prevent tricky bug related to recursive
approach of building vectorization tree. For loop below takes number of
operands directly from tree entry rather than from scalars.
If the entry at this moment turns out incomplete (i.e. not all operands set)
then not all the dependencies will be seen by the scheduler.
This can lead to failed scheduling (and thus failed vectorization)
for perfectly vectorizable tree.
Here is code example which is likely to fire the assertion:
for (i : VL0->getNumOperands()) {
...
TE->setOperand(i, Operands);
buildTree_rec(Operands, Depth + 1,...);
}
Correct way is two steps process: first set all operands to a tree entry
and then recursively process each operand.
Differential Revision: https://reviews.llvm.org/D75296
More information about the All-commits
mailing list