From d2dd0fac483c1ac2dba5c19626669b86256073bb Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Sat, 28 Mar 2020 01:40:31 -0400 Subject: [PATCH] Fix `-Wsign-compare` warning. NFC. --- llvm/lib/Target/X86/X86PartialReduction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/X86/X86PartialReduction.cpp b/llvm/lib/Target/X86/X86PartialReduction.cpp index 4cd231de3440..daa293d1e740 100644 --- a/llvm/lib/Target/X86/X86PartialReduction.cpp +++ b/llvm/lib/Target/X86/X86PartialReduction.cpp @@ -372,7 +372,7 @@ bool X86PartialReduction::trySADReplacement(Value *Op, BinaryOperator *Add) { unsigned Stages = Log2_32(NumSplits); for (unsigned s = Stages; s > 0; --s) { unsigned NumConcatElts = Ops[0]->getType()->getVectorNumElements() * 2; - for (unsigned i = 0; i != 1 << (s - 1); ++i) { + for (unsigned i = 0; i != 1U << (s - 1); ++i) { SmallVector ConcatMask(NumConcatElts); std::iota(ConcatMask.begin(), ConcatMask.end(), 0); Ops[i] = Builder.CreateShuffleVector(Ops[i*2], Ops[i*2+1], ConcatMask);