diff options
author | Tamar Christina <tamar.christina@arm.com> | 2019-02-14 17:17:20 +0000 |
---|---|---|
committer | Tamar Christina <tnfchris@gcc.gnu.org> | 2019-02-14 17:17:20 +0000 |
commit | 2a26aed6ad28a8261f5e2d8cfd3f8ae7355be934 (patch) | |
tree | 019d8312f886fc614ad63a49bb7b1de4a363db8e /gcc/testsuite/lib | |
parent | bb2a18a3a8736069af6d03965e77aaa89c6a1eed (diff) | |
download | gcc-2a26aed6ad28a8261f5e2d8cfd3f8ae7355be934.zip gcc-2a26aed6ad28a8261f5e2d8cfd3f8ae7355be934.tar.gz gcc-2a26aed6ad28a8261f5e2d8cfd3f8ae7355be934.tar.bz2 |
Arm: Add HF modes to ANY iterators
The iterator ANY64 are used in various general split patterns and is supposed
to contain all 64 bit modes.
For some reason the pattern has HI but not HF. This adds HF so that general
64 bit splits are generated for these modes as well. These are required
by various split patterns that expect them to be there.
gcc/ChangeLog:
PR target/88850
* config/arm/iterators.md (ANY64): Add V4HF.
gcc/testsuite/ChangeLog:
PR target/88850
* gcc.target/arm/pr88850-2.c: New test.
* lib/target-supports.exp
(check_effective_target_arm_neon_softfp_fp16_ok_nocache,
check_effective_target_arm_neon_softfp_fp16_ok,
add_options_for_arm_neon_softfp_fp16): New.
From-SVN: r268884
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 5e53255..a567963 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3785,6 +3785,44 @@ proc check_effective_target_arm_neon_fp16_ok { } { check_effective_target_arm_neon_fp16_ok_nocache] } +# Return 1 if this is an ARM target supporting -mfpu=neon-fp16 +# and -mfloat-abi=softfp together. Some multilibs may be +# incompatible with these options. Also set et_arm_neon_softfp_fp16_flags to +# the best options to add. + +proc check_effective_target_arm_neon_softfp_fp16_ok_nocache { } { + global et_arm_neon_softfp_fp16_flags + global et_arm_neon_flags + set et_arm_neon_softfp_fp16_flags "" + if { [check_effective_target_arm32] + && [check_effective_target_arm_neon_ok] } { + foreach flags {"-mfpu=neon-fp16 -mfloat-abi=softfp" + "-mfloat-abi=softfp -mfp16-format=ieee" + "-mfpu=neon-fp16 -mfloat-abi=softfp -mfp16-format=ieee"} { + if { [check_no_compiler_messages_nocache arm_neon_softfp_fp16_ok object { + #include "arm_neon.h" + float16x4_t + foo (float32x4_t arg) + { + return vcvt_f16_f32 (arg); + } + } "$et_arm_neon_flags $flags"] } { + set et_arm_neon_softfp_fp16_flags [concat $et_arm_neon_flags $flags] + return 1 + } + } + } + + return 0 +} + +proc check_effective_target_arm_neon_softfp_fp16_ok { } { + return [check_cached_effective_target arm_neon_softfp_fp16_ok \ + check_effective_target_arm_neon_softfp_fp16_ok_nocache] +} + + + proc check_effective_target_arm_neon_fp16_hw { } { if {! [check_effective_target_arm_neon_fp16_ok] } { return 0 @@ -3808,6 +3846,14 @@ proc add_options_for_arm_neon_fp16 { flags } { return "$flags $et_arm_neon_fp16_flags" } +proc add_options_for_arm_neon_softfp_fp16 { flags } { + if { ! [check_effective_target_arm_neon_softfp_fp16_ok] } { + return "$flags" + } + global et_arm_neon_softfp_fp16_flags + return "$flags $et_arm_neon_softfp_fp16_flags" +} + # Return 1 if this is an ARM target supporting the FP16 alternative # format. Some multilibs may be incompatible with the options needed. Also # set et_arm_neon_fp16_flags to the best options to add. |