diff options
author | Julian Brown <julian@codesourcery.com> | 2010-07-03 00:46:51 +0000 |
---|---|---|
committer | Sandra Loosemore <sandra@gcc.gnu.org> | 2010-07-02 20:46:51 -0400 |
commit | 400cfcf50e5aeae792e8ef39a743b1cb6fafedd5 (patch) | |
tree | 9f14cb8f4c3701b249e5dd7502eece5a6c4374e7 /gcc/doc | |
parent | bab53516d0a58120f1d3b24aabc09a3d7e6443aa (diff) | |
download | gcc-400cfcf50e5aeae792e8ef39a743b1cb6fafedd5.zip gcc-400cfcf50e5aeae792e8ef39a743b1cb6fafedd5.tar.gz gcc-400cfcf50e5aeae792e8ef39a743b1cb6fafedd5.tar.bz2 |
re PR target/43703 (Unexpected floating point precision loss due to ARM NEON autovectorization)
2010-07-02 Julian Brown <julian@codesourcery.com>
Sandra Loosemore <sandra@codesourcery.com>
PR target/43703
gcc/
* config/arm/vec-common.md (add<mode>3, sub<mode>3, smin<mode>3)
(smax<mode>3): Disable for NEON float modes when
flag_unsafe_math_optimizations is false.
* config/arm/neon.md (*add<mode>3_neon, *sub<mode>3_neon)
(*mul<mode>3_neon)
(mul<mode>3add<mode>_neon, mul<mode>3neg<mode>add<mode>_neon)
(reduc_splus_<mode>, reduc_smin_<mode>, reduc_smax_<mode>): Disable
for NEON float modes when flag_unsafe_math_optimizations is false.
(quad_halves_<code>v4sf): Only enable if flag_unsafe_math_optimizations
is true.
* doc/invoke.texi (ARM Options): Add note about floating point
vectorization requiring -funsafe-math-optimizations.
gcc/testsuite/
* gcc.dg/vect/vect.exp: Add -ffast-math for NEON.
* gcc.dg/vect/vect-reduc-6.c: Add XFAIL for NEON.
Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>
From-SVN: r161763
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 21740c1..458dc79 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -9976,6 +9976,14 @@ of GCC@. If @option{-msoft-float} is specified this specifies the format of floating point values. +If the selected floating-point hardware includes the NEON extension +(e.g. @option{-mfpu}=@samp{neon}), note that floating-point +operations will not be used by GCC's auto-vectorization pass unless +@option{-funsafe-math-optimizations} is also specified. This is +because NEON hardware does not fully implement the IEEE 754 standard for +floating-point arithmetic (in particular denormal values are treated as +zero), so the use of NEON instructions may lead to a loss of precision. + @item -mfp16-format=@var{name} @opindex mfp16-format Specify the format of the @code{__fp16} half-precision floating-point type. |