public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/56586] New: ARM vfpv3: Not using FPU (vsqrt op) for sqrt() / sqrtf()
@ 2013-03-10 6:08 egnor at google dot com
2013-03-12 8:41 ` [Bug target/56586] " rearnsha at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: egnor at google dot com @ 2013-03-10 6:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56586
Bug #: 56586
Summary: ARM vfpv3: Not using FPU (vsqrt op) for sqrt() /
sqrtf()
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: egnor@google.com
I have gcc built for armeb-unknown-eabi-gcc, using --with-fpu=vfpv3-d16. (I'm
using a Cortex R4-based T.I. TMS570 chip, but I expect this would happen with
any ARM vfpv3 target.)
When I compile code that uses sqrt() or sqrtf(), it emits a call to those
functions, which are defined in libg. Those functions compute the square root
in software.
Expected behavior is to use the available vsqrt.f32 or vsqrt.f64 opcodes, which
calculate a lovely square root very quickly.
(Sample code available, but it's trivial: "double foo(double x) { return
sqrt(x); }".)
I see a patch to improve vsqrt handing for AArch64
(http://gcc.gnu.org/ml/gcc-patches/2013-01/msg00411.html) but I don't think
that would apply to the 32-bit ARM chips I'm using.
gcc -v output:
=====
Using built-in specs.
COLLECT_GCC=./third_party/car/embedded/toolchains/gcc_tms570/bin/armeb-unknown-eabi-gcc
COLLECT_LTO_WRAPPER=/google/src/cloud/egnor/control/google3/third_party/car/embedded/toolchains/gcc_tms570/bin/../libexec/gcc/armeb-unknown-eabi/4.7.2/lto-wrapper
Target: armeb-unknown-eabi
Configured with: ../gcc-4.7.2/configure
--prefix=/usr/local/google/armeb/toolchain --build=x86_64-cross-linux-gnu
--target=armeb-unknown-eabi --host=x86_64-cross-linux-gnu
--with-sysroot=/usr/local/google/armeb/sysroot --with-newlib
--with-headers=../newlib-1.19.0/newlib/libc/include --disable-nls
--enable-languages=c,c++ --enable-c99 --enable-long-long
--with-mpfr=/usr/local/google/armeb/toolchain
--with-gmp=/usr/local/google/armeb/toolchain
--with-mpc=/usr/local/google/armeb/toolchain --disable-multilib
--with-abi=aapcs --with-arch=armv7-r --with-mode=thumb --with-float=hard
--with-fpu=vfpv3-d16 --disable-threads --disable-shared --disable-libgomp
--disable-libmudflap --disable-libssp
Thread model: single
gcc version 4.7.2 (GCC)
======
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/56586] ARM vfpv3: Not using FPU (vsqrt op) for sqrt() / sqrtf()
2013-03-10 6:08 [Bug target/56586] New: ARM vfpv3: Not using FPU (vsqrt op) for sqrt() / sqrtf() egnor at google dot com
@ 2013-03-12 8:41 ` rearnsha at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2013-03-12 8:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56586
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2013-03-12 08:40:52 UTC ---
sqrt() and sqrtf() set errno when the input is invalid. The compiler only
inlines these when -fno-math-errno is set (or one of the other compiler options
that enables this).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-12 8:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-10 6:08 [Bug target/56586] New: ARM vfpv3: Not using FPU (vsqrt op) for sqrt() / sqrtf() egnor at google dot com
2013-03-12 8:41 ` [Bug target/56586] " rearnsha at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).