]> granicus.if.org Git - llvm/commitdiff
Compare to an unsigned literal to avoid a -Wsign-compare warning.
authorChandler Carruth <chandlerc@gmail.com>
Sat, 11 Jun 2016 08:02:01 +0000 (08:02 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 11 Jun 2016 08:02:01 +0000 (08:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272459 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ShuffleDecodeConstantPool.cpp

index f4a3461e971c6c301d2c41dfaf96e6294ab7a5b4..a0b64e755837c81c5032f3d596cd5393d63f77b8 100644 (file)
@@ -207,7 +207,7 @@ void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize,
     //   10b           1        Zero.
     //   11b           0        Zero.
     //   11b           1        Source selected by Selector index.
-    if ((M2Z & 0x2) != 0 && MatchBit != (M2Z & 0x1)) {
+    if ((M2Z & 0x2) != 0u && MatchBit != (M2Z & 0x1)) {
       ShuffleMask.push_back(SM_SentinelZero);
       continue;
     }