[AArch64] Remove TODO (redundant type conversions) in arm_neon.h

Jiong Wang jiong.wang@foss.arm.com
Mon Jan 11 11:56:00 GMT 2016


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?

Thanks.

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-todo.patch
Type: text/x-patch
Size: 12953 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160111/83cb5614/attachment.bin>


More information about the Gcc-patches mailing list