[llvm] r272869 - [X86] Inline a couple lambdas into their callers since they are only used once and it all fits on a single line. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 20:11:00 PDT 2016


Author: ctopper
Date: Wed Jun 15 22:11:00 2016
New Revision: 272869

URL: http://llvm.org/viewvc/llvm-project?rev=272869&view=rev
Log:
[X86] Inline a couple lambdas into their callers since they are only used once and it all fits on a single line. NFC

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=272869&r1=272868&r2=272869&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jun 15 22:11:00 2016
@@ -9829,11 +9829,7 @@ static SDValue lowerV8I16VectorShuffle(S
           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(S
                                                      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.");
 




More information about the llvm-commits mailing list