[llvm] d3649c2 - [Vectorize] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 13 09:30:17 PDT 2022
Author: Kazu Hirata
Date: 2022-09-13T09:30:06-07:00
New Revision: d3649c2be463a58175639ce0be21daf10df10d3f
URL: https://github.com/llvm/llvm-project/commit/d3649c2be463a58175639ce0be21daf10df10d3f
DIFF: https://github.com/llvm/llvm-project/commit/d3649c2be463a58175639ce0be21daf10df10d3f.diff
LOG: [Vectorize] Fix a warning
This patch fixes:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5879:5: error:
expression result unused [-Werror,-Wunused-value]
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 266b592b8165..a58b4bef0e6b 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -5876,7 +5876,7 @@ static bool isAlternateInstruction(const Instruction *I,
assert((MainP == P || AltP == P || MainP == SwappedP || AltP == SwappedP) &&
"CmpInst expected to match either main or alternate predicate or "
"their swap.");
- AltP;
+ (void)AltP;
return MainP != P && MainP != SwappedP;
}
return I->getOpcode() == AltOp->getOpcode();
More information about the llvm-commits
mailing list