This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Abort in output_vec_const_move
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Hartmut Penner <HPENNER at de dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, dje at watson dot ibm dot com, Geoff Keating <geoffk at geoffk dot org>, Segher Boessenkool <BOESSEN at de dot ibm dot com>
- Date: Tue, 23 Mar 2004 07:51:52 -0400
- Subject: Re: [Patch] Abort in output_vec_const_move
- References: <OF3641B672.1B48BC4C-ONC1256E5F.0048E742-C1256E5F.004A28E8@de.ibm.com>
Hi Hartmut.
Before I take a closer look at this... Since we are duplicating the
code below in easy_vector_constant, can you come up with a generic way
(be it macros or a separate function) to avoid duplicating all this
code. (Preferably a separate function).
> - return TARGET_ALTIVEC && EASY_VECTOR_15_ADD_SELF (cst, op, mode);
> + if (TARGET_ALTIVEC)
> + switch (mode)
> + {
> + case V4SImode:
> + if (EASY_VECTOR_15_ADD_SELF (cst, op, mode))
> + return 1;
> + if ((cst & 0xffff) != ((cst >> 16) & 0xffff))
> + break;
> + cst = cst >> 16;
> + case V8HImode:
> + if (EASY_VECTOR_15_ADD_SELF (cst, op, mode))
> + return 1;
> + if ((cst & 0xff) != ((cst >> 8) & 0xff))
> + break;
> + cst = cst >> 8;
> + case V16QImode:
> + if (EASY_VECTOR_15_ADD_SELF (cst, op, mode))
> + return 1;
> + default:
> + break;
> + }
> + return 0;
> }
Thanks.
Aldy