This is the mail archive of the
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: dje at watson dot ibm dot com, gcc-patches at gcc dot gnu dot org, Geoff Keating <geoffk at geoffk dot org>, Segher Boessenkool <BOESSEN at de dot ibm dot com>
- Date: Mon, 29 Mar 2004 14:56:32 -0400
- Subject: Re: [Patch] Abort in output_vec_const_move
- References: <OF98B374B9.8560BD12-ONC1256E60.00555F98-C1256E60.firstname.lastname@example.org>
This is all fine in principle, but you still have too much code
duplicated. This bit is replicated 3 times:
> + int i, units;
> + rtvec v;
> + units = GET_MODE_NUNITS (GET_MODE (operands));
> + v = rtvec_alloc (units);
> + for (i = 0; i < units; i++)
> + RTVEC_ELT (v, i) =
> + GEN_INT (INTVAL (CONST_VECTOR_ELT (operands, i)) >> 1);
> + operands = gen_rtx_raw_CONST_VECTOR (GET_MODE (operands), v);
Please abstract into one function, bootstrap, and test...then it's OK
for both 3.4 and mainline.
BTW, is there a PR associated with this?