]> granicus.if.org Git - llvm/commitdiff
[X86] Inline a couple lambdas into their callers since they are only used once and...
authorCraig Topper <craig.topper@gmail.com>
Thu, 16 Jun 2016 03:11:00 +0000 (03:11 +0000)
committerCraig Topper <craig.topper@gmail.com>
Thu, 16 Jun 2016 03:11:00 +0000 (03:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272869 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 61b8231eb9f261c088e71bf7d8abe42d3d6bbead..4a178116d9e5a2e08d8772f6be87067725dd87f9 100644 (file)
@@ -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.");