[PATCH] Remove unused variable.

Diego Novillo dnovillo at google.com
Sat Jan 31 09:17:25 PST 2015


This variable is only used inside an assert. This breaks builds with
asserts disabled.

OK for trunk?

http://reviews.llvm.org/D7314

Files:
  lib/Target/X86/Utils/X86ShuffleDecode.cpp

Index: lib/Target/X86/Utils/X86ShuffleDecode.cpp
===================================================================
--- lib/Target/X86/Utils/X86ShuffleDecode.cpp
+++ lib/Target/X86/Utils/X86ShuffleDecode.cpp
@@ -400,14 +400,14 @@
 }
 
 void DecodeZeroExtendMask(MVT SrcVT, MVT DstVT, SmallVectorImpl<int> &Mask) {
-  unsigned NumSrcElts = SrcVT.getVectorNumElements();
   unsigned NumDstElts = DstVT.getVectorNumElements();
   unsigned SrcScalarBits = SrcVT.getScalarSizeInBits();
   unsigned DstScalarBits = DstVT.getScalarSizeInBits();
   unsigned Scale = DstScalarBits / SrcScalarBits;
   assert(SrcScalarBits < DstScalarBits &&
          "Expected zero extension mask to increase scalar size");
-  assert(NumSrcElts >= NumDstElts && "Too many zero extension lanes");
+  assert(SrcVT.getVectorNumElements() >= NumDstElts &&
+         "Too many zero extension lanes");
 
   for (unsigned i = 0; i != NumDstElts; i++) {
     Mask.push_back(i);

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7314.19094.patch
Type: text/x-patch
Size: 962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150131/a6a9d039/attachment.bin>


More information about the llvm-commits mailing list