mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Fix: SLPVectorizer tried to move an instruction which was replaced by a vector instruction.
For a detailed description of the problem see the comment in the test file. The problematic moveBefore() calls are not required anymore because the new scheduling algorithm ensures a correct ordering anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216656 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -3112,11 +3112,9 @@ bool SLPVectorizer::tryToVectorize(BinaryOperator *V, BoUpSLP &R) {
|
||||
BinaryOperator *B0 = dyn_cast<BinaryOperator>(B->getOperand(0));
|
||||
BinaryOperator *B1 = dyn_cast<BinaryOperator>(B->getOperand(1));
|
||||
if (tryToVectorizePair(A, B0, R)) {
|
||||
B->moveBefore(V);
|
||||
return true;
|
||||
}
|
||||
if (tryToVectorizePair(A, B1, R)) {
|
||||
B->moveBefore(V);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -3126,11 +3124,9 @@ bool SLPVectorizer::tryToVectorize(BinaryOperator *V, BoUpSLP &R) {
|
||||
BinaryOperator *A0 = dyn_cast<BinaryOperator>(A->getOperand(0));
|
||||
BinaryOperator *A1 = dyn_cast<BinaryOperator>(A->getOperand(1));
|
||||
if (tryToVectorizePair(A0, B, R)) {
|
||||
A->moveBefore(V);
|
||||
return true;
|
||||
}
|
||||
if (tryToVectorizePair(A1, B, R)) {
|
||||
A->moveBefore(V);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user