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: [AArch64] Remove TODO (redundant type conversions) in arm_neon.h


On Mon, Jan 11, 2016 at 11:56:50AM +0000, Jiong Wang wrote:
> There are quite a few redundant type conversions in arm_neon.h, all of
> them are intrinsics taking argument of vector float type and return result
> of vector unsigned integer type.
> 
> The problem is currently we support UNOP and UNOPU qualifiers for unary
> "signed <- signed", "unsigned <- unsigned" respectively, while we are
> lack of unary "unsigned <- signed" qualifier which is added by this patch
> as UNOPUS.
> 
> "vector unsigned int" <- "vector float" should fall into UNOPUS catalogue.
> 
> I guess this patch also fix hiding bugs in arm_neon.h which will be exposed
> when -Wconversion specified because several builtins are returning inconsistent
> types with declared, for example "vcvtas_u32_f32", "vcvtad_u64_f64".
> 
> ok for trunk or should wait until stage-1 re-open?
> 

Yes, because of those bugs I'd like to take this now.

OK for trunk.

Thanks,
James

> 2016-01-11  Jiong. Wang  <jiong.wang@arm.com>
> 
> gcc/
>   * config/aarch64/aarch64-builtins.c (aarch64_types_unopus_qualifiers):
>   New.
>   (TYPES_UNOPUS): New.
>   * config/aarch64/aarch64-simd-builtins.def (lbtruncuv2sf): Correct
>   builtin type, from UNOP to UNOPUS.
>   (lbtruncuv4sf): Likewise.
>   (lbtruncuv2df): Likewise.
>   (lrounduv2sf): Likewise.
>   (lrounduv4sf): Likewise.
>   (lrounduv2df): Likewise.
>   (lroundusf): Likewise.
>   (lroundusf): Likewise.
>   (lceiluv2sf): Likewise.
>   (lceiluv4sf): Likewise.
>   (lceiluv2df): Likewise.
>   (lceilusf): Likewise.
>   (lceiludf): Likewise.
>   (lflooruv2sf): Likewise.
>   (lflooruv4sf): Likewise.
>   (lflooruv2df): Likewise.
>   (lfloorusf): Likewise.
>   (lfloorudf): Likewise.
>   (lfrintnuv2sf): Likewise.
>   (lfrintnuv4sf): Likewise.
>   (lfrintnuv2df): Likewise.
>   (lfrintnusf): Likewise.
>   (lfrintnudf): Likewise.
>   * config/aarch64/arm_neon.h (vcvt_u32_f32): Remove unncessary type
>   conversion.
>   (vcvtq_u32_f32): Likewise.
>   (vcvtq_u64_f64): Likewise.
>   (vcvta_u32_f32): Likewise.
>   (vcvtaq_u32_f32): Likewise.
>   (vcvtaq_u64_f64): Likewise.
>   (vcvtm_u32_f32): Likewise.
>   (vcvtmq_u32_f32): Likewise.
>   (vcvtmq_u64_f64): Likewise.
>   (vcvtn_u32_f32): Likwise.
>   (vcvtnq_u32_f32): Likewise.
>   (vcvtnq_u64_f64): Likewise.
>   (vcvtp_u32_f32): Likewise.
>   (vcvtpq_u32_f32): Likewise.
>   (vcvtpq_u64_f64): Likewise.
>   (vcvtmd_u64_f64): Likewise.
>   (vcvtms_u32_f32): Likewise.
>   (vcvtad_u64_f64): Likewise.
>   (vcvtas_u32_f32): Likewise.
>   (vcvtnd_u64_f64): Likewise.
>   (vcvtns_u32_f32): Likewise.
>   (vcvtpd_u64_f64): Likewise.
>   (vcvtps_u32_f32): Likewise.
> 



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