[llvm] r314667 - [X86][SSE] Fix -Wsign-compare problems introduced in r314658
Bjorn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 05:46:38 PDT 2017
Author: bjope
Date: Mon Oct 2 05:46:38 2017
New Revision: 314667
URL: http://llvm.org/viewvc/llvm-project?rev=314667&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=314667&r1=314666&r2=314667&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Oct 2 05:46:38 2017
@@ -5449,10 +5449,10 @@ static bool getTargetShuffleMaskIndices(
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)
More information about the llvm-commits
mailing list