]> granicus.if.org Git - llvm/commitdiff
Fix signed/unsigned comparison warning. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 29 Aug 2019 11:18:53 +0000 (11:18 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 29 Aug 2019 11:18:53 +0000 (11:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370333 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index c40c1a551c241619c30cf5b3114b0f6100e6f636..e2ce006a17b78d1e938ffdca4f9bade7ed299454 100644 (file)
@@ -16460,7 +16460,8 @@ SDValue DAGCombiner::combineInsertEltToShuffle(SDNode *N, unsigned InsIndex) {
 
       auto *ExtrIndex = cast<ConstantSDNode>(InsertVal.getOperand(1));
       NewMask[InsIndex] = XOffset + ExtrIndex->getZExtValue();
-      assert(NewMask[InsIndex] < 2 * Vec.getValueType().getVectorNumElements() &&
+      assert(NewMask[InsIndex] <
+                 (int)(2 * Vec.getValueType().getVectorNumElements()) &&
              NewMask[InsIndex] >= 0 && "NewMask[InsIndex] is out of bound");
 
       SDValue LegalShuffle =