From 7d8bfe525663a981c4b35f24a3c8a0258e703ed2 Mon Sep 17 00:00:00 2001 From: Bjorn Pettersson Date: Mon, 2 Oct 2017 12:46:38 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314667 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ISelLowering.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 7e5e709aa3b..7dada542d38 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/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) -- 2.40.0