Thanks, pushed with comment and ChangeLog fix as r227033.
--Alan Kyrill Tkachov wrote:
Hi Alan, On 28/07/15 12:23, Alan Lawrence wrote:This makes the existing float16 vector intrinsics available only when we have an __fp16 type (i.e. when one of the ARM_FP16_FORMAT_... macros is defined). Thus, we also rearrange the float16x[48]_t types to use the same type as __fp16 for the element type (ACLE says that __fp16 should be an alias). To keep the existing gcc.target/arm/neon/vcvt{f16_f32,f32_f16} tests working, as these do not specify an -mfp16-format, I've modified check_effective_target_arm_neon_fp16_ok to add in -mfp16-format=ieee *if necessary* (hence still allowing an explicit -mfp16-format=alternative). A documentation fix for this follows in the last patch. gcc/ChangeLog: * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Move initialization of HFmode scalar type (float16_t) to... (arm_init_fp16_builtins): ...here, combining with previous __fp16.I'd say: "... Here. Combine with __fp16 initialization code"(arm_init_builtins): Call arm_init_fp16_builtins earlier and always. * config/arm/arm_neon.h (vcvt_f16_f32, vcvt_f32_f16): Condition on having an -mfp16-format. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_arm_neon_fp16_ok_nocache): Add flag variants with -mfp16-format=ieee.@@ -1752,12 +1749,11 @@ arm_init_builtins (void) if (TARGET_REALLY_IWMMXT) arm_init_iwmmxt_builtins ();+ arm_init_fp16_builtins ();+ if (TARGET_NEON) arm_init_neon_builtins ();- if (arm_fp16_format)- arm_init_fp16_builtins (); - if (TARGET_CRC32) arm_init_crc32_builtins (); Can you please add a comment above arm_init_fp16_builtins (); saying that it needs to be called before arm_init_neon_builtins so that arm_simd_floatHF_type_node gets initialised properly? (Or words to that effect). Ok with the comment. Thanks, Kyrill
