summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>2017-10-02 12:46:38 +0000
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>2017-10-02 12:46:38 +0000
commit8e978c0151d58bc33a2aee566fbe2fcb3de4c3a7 (patch)
tree6a75a34876365733851f4740d1ea0e03fe8cb78a /llvm/lib/Target
parent839775a277b98f7fc2dce121a4634d0a33f5b394 (diff)
downloadbcm5719-llvm-8e978c0151d58bc33a2aee566fbe2fcb3de4c3a7.tar.gz
bcm5719-llvm-8e978c0151d58bc33a2aee566fbe2fcb3de4c3a7.zip
[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
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp8
1 files changed, 4 insertions, 4 deletions
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<int> &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)
OpenPOWER on IntegriCloud