[llvm] 94a07c7 - [SLP][NFC] Fix condition that was supposed to save a bit of compile time.
Valery N Dmitriev via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 11 10:09:07 PDT 2021
Author: Valery N Dmitriev
Date: 2021-06-11T10:08:55-07:00
New Revision: 94a07c79cf108b8b9566acfa64d11aca27d60a84
URL: https://github.com/llvm/llvm-project/commit/94a07c79cf108b8b9566acfa64d11aca27d60a84
DIFF: https://github.com/llvm/llvm-project/commit/94a07c79cf108b8b9566acfa64d11aca27d60a84.diff
LOG: [SLP][NFC] Fix condition that was supposed to save a bit of compile time.
It was found by chance revealing discrepancy between comment (few lines above),
the condition and how re-ordering of instruction is done inside the if statement
it guards. The condition was always evaluated to true.
Differential Revision: https://reviews.llvm.org/D104064
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index b88163ab11d1..46a1b00e3e01 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -6316,7 +6316,7 @@ void BoUpSLP::scheduleBlock(BlockScheduling *BS) {
ScheduleData *BundleMember = picked;
while (BundleMember) {
Instruction *pickedInst = BundleMember->Inst;
- if (LastScheduledInst->getNextNode() != pickedInst) {
+ if (pickedInst->getNextNode() != LastScheduledInst) {
BS->BB->getInstList().remove(pickedInst);
BS->BB->getInstList().insert(LastScheduledInst->getIterator(),
pickedInst);
More information about the llvm-commits
mailing list