[llvm] r229970 - Fix -Wunused-variable warning in non-asserts build, and optimize a little bit while I'm here.
David Blaikie
dblaikie at gmail.com
Thu Feb 19 22:28:39 PST 2015
Author: dblaikie
Date: Fri Feb 20 00:28:38 2015
New Revision: 229970
URL: http://llvm.org/viewvc/llvm-project?rev=229970&view=rev
Log:
Fix -Wunused-variable warning in non-asserts build, and optimize a little bit while I'm here.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=229970&r1=229969&r2=229970&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Feb 20 00:28:38 2015
@@ -8243,14 +8243,14 @@ static SDValue lowerV8I16VectorShuffle(S
auto isV1 = [](int M) { return M >= 0 && M < 8; };
auto isV2 = [](int M) { return M >= 8; };
- int NumV1Inputs = std::count_if(Mask.begin(), Mask.end(), isV1);
int NumV2Inputs = std::count_if(Mask.begin(), Mask.end(), isV2);
if (NumV2Inputs == 0)
return lowerV8I16SingleInputVectorShuffle(DL, V1, Mask, Subtarget, DAG);
- assert(NumV1Inputs > 0 && "All single-input shuffles should be canonicalized "
- "to be V1-input shuffles.");
+ assert(std::any_of(Mask.begin(), Mask.end(), isV1) &&
+ "All single-input shuffles should be canonicalized to be V1-input "
+ "shuffles.");
// Try to use shift instructions.
if (SDValue Shift =
More information about the llvm-commits
mailing list