This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Fix annoying "i386.md: operand 1 missing mode" warnings
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 23 Nov 2009 10:46:45 -0500
- Subject: Re: [PATCH, i386]: Fix annoying "i386.md: operand 1 missing mode" warnings
- References: <5787cf470911230451n616cc8bbn73feb08dbdd82f08@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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