From 8e978c0151d58bc33a2aee566fbe2fcb3de4c3a7 Mon Sep 17 00:00:00 2001 From: Bjorn Pettersson Date: Mon, 2 Oct 2017 12:46:38 +0000 Subject: [X86][SSE] Fix -Wsign-compare problems introduced in r314658 The refactoring in "[X86][SSE] Add createPackShuffleMask helper function. NFCI." resulted in warning when compiling the code (seen in build bots). This patch restores some types from int to unsigned to avoid those warnings. llvm-svn: 314667 --- llvm/lib/Target/X86/X86ISelLowering.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Target') diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 7e5e709aa3b..7dada542d38 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -5449,10 +5449,10 @@ static bool getTargetShuffleMaskIndices(SDValue MaskNode, static void createPackShuffleMask(MVT VT, SmallVectorImpl &Mask, bool Unary) { assert(Mask.empty() && "Expected an empty shuffle mask vector"); - int NumElts = VT.getVectorNumElements(); - int NumLanes = VT.getSizeInBits() / 128; - int NumEltsPerLane = 128 / VT.getScalarSizeInBits(); - int Offset = Unary ? 0 : NumElts; + unsigned NumElts = VT.getVectorNumElements(); + unsigned NumLanes = VT.getSizeInBits() / 128; + unsigned NumEltsPerLane = 128 / VT.getScalarSizeInBits(); + unsigned Offset = Unary ? 0 : NumElts; for (unsigned Lane = 0; Lane != NumLanes; ++Lane) { for (unsigned Elt = 0; Elt != NumEltsPerLane; Elt += 2) -- cgit v1.2.3