[llvm] r272463 - Try a bit harder to remove the signed and unsigned comparison warning.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 11 02:13:01 PDT 2016


Author: chandlerc
Date: Sat Jun 11 04:13:00 2016
New Revision: 272463

URL: http://llvm.org/viewvc/llvm-project?rev=272463&view=rev
Log:
Try a bit harder to remove the signed and unsigned comparison warning.
Hopefully this time it actually works and stays away.

Modified:
    llvm/trunk/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp

Modified: llvm/trunk/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp?rev=272463&r1=272462&r2=272463&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp Sat Jun 11 04:13:00 2016
@@ -199,7 +199,7 @@ void DecodeVPERMIL2PMask(const Constant
     // Bits[2:1] - (Per Lane) PD Shuffle Mask.
     // Bits[2:0] - (Per Lane) PS Shuffle Mask.
     uint64_t Selector = cast<ConstantInt>(COp)->getZExtValue();
-    int MatchBit = (Selector >> 3) & 0x1;
+    unsigned MatchBit = (Selector >> 3) & 0x1;
 
     // M2Z[0:1]     MatchBit
     //   0Xb           X        Source selected by Selector index.




More information about the llvm-commits mailing list