This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386]: Fix annoying "i386.md: operand 1 missing mode" warnings


On Mon, Nov 23, 2009 at 01:51:26PM +0100, Uros Bizjak wrote:
> @@ -24535,7 +24546,7 @@ ix86_builtin_reciprocal (unsigned int fn
>  int
>  avx_vpermilp_parallel (rtx par, enum machine_mode mode)
>  {
> -  unsigned i, nelt = GET_MODE_NUNITS (mode);
> +  int i, nelt = GET_MODE_NUNITS (mode);
>    unsigned mask = 0;
>    unsigned char ipar[8];
>  
> @@ -24548,7 +24559,7 @@ avx_vpermilp_parallel (rtx par, enum mac
>    for (i = 0; i < nelt; ++i)
>      {
>        rtx er = XVECEXP (par, 0, i);
> -      unsigned HOST_WIDE_INT ei;
> +      HOST_WIDE_INT ei;
>  
>        if (!CONST_INT_P (er))
>  	return 0;

Won't this consider negative constants as valid?
I'd say
--- config/i386/i386.c	(revision 154447)
+++ config/i386/i386.c	(working copy)
@@ -24539,7 +24539,7 @@ avx_vpermilp_parallel (rtx par, enum mac
   unsigned mask = 0;
   unsigned char ipar[8];
 
-  if (XVECLEN (par, 0) != nelt)
+  if ((unsigned int) XVECLEN (par, 0) != nelt)
     return 0;
 
   /* Validate that all of the elements are constants, and not totally

would be shorter and better, given that negative number of elements
doesn't make any sense.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]