From: Craig Topper Date: Thu, 16 Jun 2016 03:11:00 +0000 (+0000) Subject: [X86] Inline a couple lambdas into their callers since they are only used once and... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9dd8c46c26fff48b8e5564eb2e98c7255e79d55;p=llvm [X86] Inline a couple lambdas into their callers since they are only used once and it all fits on a single line. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272869 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 61b8231eb9f..4a178116d9e 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -9829,11 +9829,7 @@ static SDValue lowerV8I16VectorShuffle(SDValue Op, SDValue V1, SDValue V2, DL, MVT::v8i16, V1, V2, OrigMask, Subtarget, DAG)) return ZExt; - auto isV1 = [](int M) { return M >= 0 && M < 8; }; - (void)isV1; - auto isV2 = [](int M) { return M >= 8; }; - - int NumV2Inputs = count_if(Mask, isV2); + int NumV2Inputs = count_if(Mask, [](int M) { return M >= 8; }); if (NumV2Inputs == 0) { // Check for being able to broadcast a single element. @@ -9860,7 +9856,7 @@ static SDValue lowerV8I16VectorShuffle(SDValue Op, SDValue V1, SDValue V2, Subtarget, DAG); } - assert(llvm::any_of(Mask, isV1) && + assert(llvm::any_of(Mask, [](int M) { return M >= 0 && M < 8; }) && "All single-input shuffles should be canonicalized to be V1-input " "shuffles.");