This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] model vector widening multiplication for the spu
- From: Andrew_Pinski at PlayStation dot Sony dot Com
- To: gcc-patches at gcc dot gnu dot org, DORIT at il dot ibm dot com
- Cc: trevor_smigiel at playstation dot sony dot com, Andrew Pinski <pinskia at gmail dot com>
- Date: Tue, 19 Dec 2006 13:13:19 -0800
- Subject: Re: [PATCH] model vector widening multiplication for the spu
> ChangeLog:
>
> * config/spu/spu.md (vec_widen_umult_hi_v8hi): New.
> (vec_widen_umult_lo_v8hi, vec_widen_smult_hi_v8hi): New.
> (vec_widen_smult_lo_v8hi): New.
> * config/spu/spu.c (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN):
> Defined.
> (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined.
> (spu_builtin_mul_widen_even, spu_builtin_mul_widen_odd): New.
>
> Testsuite Changelog:
>
> * lib/target-supports.exp: Add spu to
> check_effective_target_vect_widen_mult_hi_to_si.
There are a couple other formatting issues (in spu_builtin_mul_widen_even
and spu_builtin_mul_widen_odd):
+ d = TYPE_UNSIGNED (type) ? &spu_builtins[SPU_MULE_0] :
+ &spu_builtins[SPU_MULE_1];
I would just do instead:
if (TYPE_UNSIGNED (type))
return spu_builtins[SPU_MULE_0].fndecl;
else
return spu_builtins[SPU_MULE_1].fndecl;
Which makes the code look cleaner and easier to figure out what is going
on.
Other than what I and Ben mentioned, this is OK.
Thanks,
Andrew Pinski