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] Abort in output_vec_const_move


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[1]));
> +  v = rtvec_alloc (units);
> +
> +  for (i = 0; i < units; i++)
> +    RTVEC_ELT (v, i) =
> +      GEN_INT (INTVAL (CONST_VECTOR_ELT (operands[1], i)) >> 1);
> +  operands[3] = gen_rtx_raw_CONST_VECTOR (GET_MODE (operands[1]), 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?

Thanks.
Aldy


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