[llvm] r228055 - [x86] Fix signed vs. unsigned comparison.

Craig Topper craig.topper at gmail.com
Tue Feb 3 16:23:06 PST 2015


Why is Size an int? Doesn't Mask.size() return an unsigned value? Is there
later use that expects an int?

On Tue, Feb 3, 2015 at 2:43 PM, Chandler Carruth <chandlerc at gmail.com>
wrote:

> Author: chandlerc
> Date: Tue Feb  3 16:43:30 2015
> New Revision: 228055
>
> URL: http://llvm.org/viewvc/llvm-project?rev=228055&view=rev
> Log:
> [x86] Fix signed vs. unsigned comparison.
>
> 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=228055&r1=228054&r2=228055&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Feb  3 16:43:30 2015
> @@ -7820,7 +7820,7 @@ static SDValue lowerVectorShuffleAsBitSh
>    SmallBitVector Zeroable = computeZeroableShuffleElements(Mask, V1, V2);
>
>    int Size = Mask.size();
> -  assert(Size == VT.getVectorNumElements() && "Unexpected mask size");
> +  assert(Size == (int)VT.getVectorNumElements() && "Unexpected mask
> size");
>
>    // PSRL : (little-endian) right bit shift.
>    // [  1, zz,  3, zz]
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150203/96b2dae6/attachment.html>


More information about the llvm-commits mailing list