ソースを参照

Fix signed/unsigned comparison warning. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370333 91177308-0d34-0410-b5e6-96231b3b80d8
Simon Pilgrim 6 年 前
コミット
b915666de3
1 ファイル変更2 行追加1 行削除
  1. 2 1
      lib/CodeGen/SelectionDAG/DAGCombiner.cpp

+ 2 - 1
lib/CodeGen/SelectionDAG/DAGCombiner.cpp

@@ -16460,7 +16460,8 @@ SDValue DAGCombiner::combineInsertEltToShuffle(SDNode *N, unsigned InsIndex) {
 
 
       auto *ExtrIndex = cast<ConstantSDNode>(InsertVal.getOperand(1));
       auto *ExtrIndex = cast<ConstantSDNode>(InsertVal.getOperand(1));
       NewMask[InsIndex] = XOffset + ExtrIndex->getZExtValue();
       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");
              NewMask[InsIndex] >= 0 && "NewMask[InsIndex] is out of bound");
 
 
       SDValue LegalShuffle =
       SDValue LegalShuffle =