[llvm] r211894 - [x86] Clean up some unused variables, especially in release builds.

Chandler Carruth chandlerc at gmail.com
Fri Jun 27 05:04:18 PDT 2014


Author: chandlerc
Date: Fri Jun 27 07:04:18 2014
New Revision: 211894

URL: http://llvm.org/viewvc/llvm-project?rev=211894&view=rev
Log:
[x86] Clean up some unused variables, especially in release builds.

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=211894&r1=211893&r2=211894&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Jun 27 07:04:18 2014
@@ -7167,9 +7167,6 @@ static SDValue lowerV8I16SingleInputVect
   MutableArrayRef<int> LoMask = Mask.slice(0, 4);
   MutableArrayRef<int> HiMask = Mask.slice(4, 4);
 
-  auto isLo = [](int M) { return M >= 0 && M < 4; };
-  auto isHi = [](int M) { return M >= 4; };
-
   SmallVector<int, 4> LoInputs;
   std::copy_if(LoMask.begin(), LoMask.end(), std::back_inserter(LoInputs),
                [](int M) { return M >= 0; });
@@ -7411,9 +7408,11 @@ static SDValue lowerV8I16SingleInputVect
 
   // At this point, each half should contain all its inputs, and we can then
   // just shuffle them into their final position.
-  assert(std::count_if(LoMask.begin(), LoMask.end(), isHi) == 0 &&
+  assert(std::count_if(LoMask.begin(), LoMask.end(),
+                       [](int M) { return M >= 4; }) == 0 &&
          "Failed to lift all the high half inputs to the low mask!");
-  assert(std::count_if(HiMask.begin(), HiMask.end(), isLo) == 0 &&
+  assert(std::count_if(HiMask.begin(), HiMask.end(),
+                       [](int M) { return M >= 0 && M < 4; }) == 0 &&
          "Failed to lift all the low half inputs to the high mask!");
 
   // Do a half shuffle for the low mask.
@@ -7498,7 +7497,8 @@ static SDValue lowerV8I16BasicBlendVecto
 
   int NumV1Inputs = LoV1Inputs.size() + HiV1Inputs.size();
   int NumV2Inputs = LoV2Inputs.size() + HiV2Inputs.size();
-
+  (void)NumV1Inputs;
+  (void)NumV2Inputs;
   assert(NumV1Inputs > 0 && NumV1Inputs <= 3 && "At most 3 inputs supported");
   assert(NumV2Inputs > 0 && NumV2Inputs <= 3 && "At most 3 inputs supported");
   assert(NumV1Inputs + NumV2Inputs <= 4 && "At most 4 combined inputs");
@@ -7609,9 +7609,6 @@ static SDValue lowerV8I16VectorShuffle(S
 
   assert(Mask.size() == 8 && "Unexpected mask size for v8 shuffle!");
 
-  int Size = Mask.size();
-  assert(Size == 8 && "Unexpected mask size for v8 shuffle!");
-
   auto isV1 = [](int M) { return M >= 0 && M < 8; };
   auto isV2 = [](int M) { return M >= 8; };
 





More information about the llvm-commits mailing list