[llvm] ceb3cdc - [SLP] remove dead code in reduction matching; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 14:03:34 PST 2021
Author: Sanjay Patel
Date: 2021-01-15T17:03:26-05:00
New Revision: ceb3cdccd0fb597659147e0f538fdee91414541e
URL: https://github.com/llvm/llvm-project/commit/ceb3cdccd0fb597659147e0f538fdee91414541e
DIFF: https://github.com/llvm/llvm-project/commit/ceb3cdccd0fb597659147e0f538fdee91414541e.diff
LOG: [SLP] remove dead code in reduction matching; NFC
To get into this block we had: !A || B || C
and we checked C in the first 'if' clause
leaving !A || B. But the 2nd 'if' is checking:
A && !B --> !(!A || B)
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 e1befc449492..cf7c05e30d06 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -6877,12 +6877,6 @@ class HorizontalReduction {
markExtraArg(Stack.back(), I);
continue;
}
- } else if (RdxLeafVal && RdxLeafVal != EdgeOpData) {
- // Make sure that the opcodes of the operations that we are going to
- // reduce match.
- // I is an extra argument for TreeN (its parent operation).
- markExtraArg(Stack.back(), I);
- continue;
} else if (!RdxLeafVal) {
RdxLeafVal = EdgeOpData;
}
More information about the llvm-commits
mailing list