[X86] Silence -Wsign-compare warnings.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 17 Feb 2015 11:20:11 +0000 (11:20 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 17 Feb 2015 11:20:11 +0000 (11:20 +0000)
GCC 4.8 reported two new warnings due to comparisons
between signed and unsigned integer expressions. The new warnings were
accidentally introduced by revision 229480.
Added explicit casts to silence the warnings. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229488 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 1bdd6fead9de24bf00f4c627496d70d2512ff7da..a08ac33065dbdb839eb3a789918700c3583b7263 100644 (file)
@@ -24946,7 +24946,7 @@ static SDValue VectorZextCombine(SDNode *N, SelectionDAG &DAG,
   unsigned ResSize = N1.getValueType().getScalarSizeInBits();
   // Make sure the splat matches the mask we expect
   if (SplatBitSize > ResSize || 
-      (SplatValue + 1).exactLogBase2() != SrcSize)
+      (SplatValue + 1).exactLogBase2() != (int)SrcSize)
     return SDValue();
 
   // Make sure the input and output size make sense
@@ -24966,7 +24966,7 @@ static SDValue VectorZextCombine(SDNode *N, SelectionDAG &DAG,
         break;
       }
     } else {
-      if (Shuffle->getMaskElt(i) != (i / ZextRatio)) {
+      if (Shuffle->getMaskElt(i) != (int)(i / ZextRatio)) {
         // Expected element number
         IsZext = false;
         break;