[llvm] r228027 - Fixed signed/unsigned comparison warning.

Chad Rosier mcrosier at codeaurora.org
Tue Feb 3 13:10:29 PST 2015


Hi Simon,
MVT::getVectorNumElements() has an 'unsigned' return type.

Would it make more sense to change NumElements to unsigned and fix the
induction variables for those loops that compare NumElements, rather than
using a cast in the assert?

 Chad

> Author: rksimon
> Date: Tue Feb  3 14:54:01 2015
> New Revision: 228027
>
> URL: http://llvm.org/viewvc/llvm-project?rev=228027&view=rev
> Log:
> Fixed signed/unsigned comparison warning.
>
>
> 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=228027&r1=228026&r2=228027&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Feb  3 14:54:01 2015
> @@ -7906,7 +7906,7 @@ static SDValue lowerVectorShuffleAsZeroO
>    int NumElements = VT.getVectorNumElements();
>    assert(VT.getScalarSizeInBits() <= 32 &&
>           "Exceeds 32-bit integer zero extension limit");
> -  assert(Mask.size() == NumElements && "Unexpected shuffle mask size");
> +  assert((int)Mask.size() == NumElements && "Unexpected shuffle mask
> size");
>
>    // Define a helper function to check a particular ext-scale and lower
> to it if
>    // valid.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>





More information about the llvm-commits mailing list