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] 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


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