public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi
[not found] <bug-39501-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-03 11:04 ` ramana at gcc dot gnu.org
2010-12-03 14:46 ` martinwguy at gmail dot com
2014-04-28 14:02 ` ramana at gcc dot gnu.org
2 siblings, 0 replies; 10+ messages in thread
From: ramana at gcc dot gnu.org @ 2010-12-03 11:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ramana at gcc dot gnu.org
Known to fail| |
--- Comment #16 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2010-12-03 11:04:06 UTC ---
Isn't this now fixed ?
Ramana
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi
[not found] <bug-39501-4@http.gcc.gnu.org/bugzilla/>
2010-12-03 11:04 ` [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi ramana at gcc dot gnu.org
@ 2010-12-03 14:46 ` martinwguy at gmail dot com
2014-04-28 14:02 ` ramana at gcc dot gnu.org
2 siblings, 0 replies; 10+ messages in thread
From: martinwguy at gmail dot com @ 2010-12-03 14:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501
--- Comment #17 from Martin Guy <martinwguy at gmail dot com> 2010-12-03 14:46:28 UTC ---
Sort of. The cause of the bug was never found, and the workaround is to disable
an instruction. It might be worth trying enabling movsfcc in current GCC and
re-running the tests, since the conditional execution stuff in the middle end
was rewritten between 4.3 and 4.4 if I remember correctly, so the actual bug in
the middle end may have gone away with that rewrite.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi
[not found] <bug-39501-4@http.gcc.gnu.org/bugzilla/>
2010-12-03 11:04 ` [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi ramana at gcc dot gnu.org
2010-12-03 14:46 ` martinwguy at gmail dot com
@ 2014-04-28 14:02 ` ramana at gcc dot gnu.org
2 siblings, 0 replies; 10+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-04-28 14:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |4.3.4
--- Comment #18 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39501] New: -O -ffinite-math-only gets min(x,y) optimization wrong for SF on arm-*-gnueabi
@ 2009-03-19 13:31 martinwguy at yahoo dot it
2009-04-04 10:37 ` [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float " rearnsha at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: martinwguy at yahoo dot it @ 2009-03-19 13:31 UTC (permalink / raw)
To: gcc-bugs
The following fragment when compiled -O -ffinite-math-only on arm-linux-gnueabi
should print 0.000000 but with gcc-4.1.2, 4.2.4, 4.3.3 it prints 99999.000000
#include <stdio.h>
#define test_min(x,y) ((x) > (y) ? (y) : (x))
int
main (void)
{
static float data [1];
float min = 99999.0 ;
min = test_min (min, data[0]) ;
printf("min = %f\n", min);
return min != 0.0 ;
}
This only happens for floats, not doubles. The main difference in the asm is
that without -ffinite-math-only (working) it goes
mov r0, r4
ldr r1, .L6+4
bl __aeabi_fcmplt
cmp r0, #0
ldr r3, .L6+4
moveq r4, r3
mov r0, r4
while with -ffinite-math-only (broken) it goes
ldr r5, .L5+4
mov r0, r4
mov r1, r5
bl __aeabi_fcmple
cmp r0, #0
movgt r4, r5
mov r0, r4
I guess that should be moveq.
This makes libvorbis fail on arm-linux-gnueabi when using softfloat.
See https://trac.xiph.org/ticket/1526 for a longer code example failing on
min() and max().
--
Summary: -O -ffinite-math-only gets min(x,y) optimization wrong
for SF on arm-*-gnueabi
Product: gcc
Version: 4.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: martinwguy at yahoo dot it
GCC target triplet: arm-linux-gnueabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi
2009-03-19 13:31 [Bug target/39501] New: -O -ffinite-math-only gets min(x,y) optimization wrong for SF " martinwguy at yahoo dot it
@ 2009-04-04 10:37 ` rearnsha at gcc dot gnu dot org
2009-04-04 11:23 ` martinwguy at yahoo dot it
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-04-04 10:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from rearnsha at gcc dot gnu dot org 2009-04-04 10:37 -------
Subject: Bug 39501
Author: rearnsha
Date: Sat Apr 4 10:37:10 2009
New Revision: 145534
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145534
Log:
PR target/39501
* arm.md (movsfcc): Disable if not TARGET_HARD_FLOAT.
* testsuite/gcc.c-torture/execute/pr39501.c: New file.
* testsuite/gcc.c-torture/execute/pr39501.x: New file.
Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr39501.c
trunk/gcc/testsuite/gcc.c-torture/execute/pr39501.x
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/arm.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi
2009-03-19 13:31 [Bug target/39501] New: -O -ffinite-math-only gets min(x,y) optimization wrong for SF " martinwguy at yahoo dot it
2009-04-04 10:37 ` [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float " rearnsha at gcc dot gnu dot org
@ 2009-04-04 11:23 ` martinwguy at yahoo dot it
2009-04-04 11:50 ` martinwguy at yahoo dot it
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: martinwguy at yahoo dot it @ 2009-04-04 11:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from martinwguy at yahoo dot it 2009-04-04 11:23 -------
Is that *it*? Disable movsfcc completely without finding the cause of the
specific failure?
No wonder the generated ARM code is bigger, slower and buggier with every
release!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi
2009-03-19 13:31 [Bug target/39501] New: -O -ffinite-math-only gets min(x,y) optimization wrong for SF " martinwguy at yahoo dot it
2009-04-04 10:37 ` [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float " rearnsha at gcc dot gnu dot org
2009-04-04 11:23 ` martinwguy at yahoo dot it
@ 2009-04-04 11:50 ` martinwguy at yahoo dot it
2009-04-04 11:53 ` steven at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: martinwguy at yahoo dot it @ 2009-04-04 11:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from martinwguy at yahoo dot it 2009-04-04 11:50 -------
Sorry about that. I've now seen
http://gcc.gnu.org/ml/gcc-patches/2009-04/msg00300.html
M
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi
2009-03-19 13:31 [Bug target/39501] New: -O -ffinite-math-only gets min(x,y) optimization wrong for SF " martinwguy at yahoo dot it
` (2 preceding siblings ...)
2009-04-04 11:50 ` martinwguy at yahoo dot it
@ 2009-04-04 11:53 ` steven at gcc dot gnu dot org
2009-04-04 12:00 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-04-04 11:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from steven at gcc dot gnu dot org 2009-04-04 11:53 -------
Re. comment #10: And who are you funding, Martin Guy, to improve GCC for ARM?
Or are you just another user who expects magic for free?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi
2009-03-19 13:31 [Bug target/39501] New: -O -ffinite-math-only gets min(x,y) optimization wrong for SF " martinwguy at yahoo dot it
` (3 preceding siblings ...)
2009-04-04 11:53 ` steven at gcc dot gnu dot org
@ 2009-04-04 12:00 ` steven at gcc dot gnu dot org
2009-04-04 12:25 ` rearnsha at gcc dot gnu dot org
2009-05-16 22:25 ` rearnsha at gcc dot gnu dot org
6 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-04-04 12:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from steven at gcc dot gnu dot org 2009-04-04 12:00 -------
Re. comment #10: I don't know about the "buggier" and "slower" parts.
But for "bigger" I know we have benchmarks that say otherwise. e.g. CSiBE for
arm-elf (http://www.inf.u-szeged.hu/csibe/s-arm.php) and CSiBE for arm-linux
(http://www.inf.u-szeged.hu/csibe/s-arm-linux.php, unfortunately stopped
running in 2006 due to -- you've guessed it -- lack of funding).
Obviously there's no denying that GCC still is too far behind most commercial
compilers for ARM...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi
2009-03-19 13:31 [Bug target/39501] New: -O -ffinite-math-only gets min(x,y) optimization wrong for SF " martinwguy at yahoo dot it
` (4 preceding siblings ...)
2009-04-04 12:00 ` steven at gcc dot gnu dot org
@ 2009-04-04 12:25 ` rearnsha at gcc dot gnu dot org
2009-05-16 22:25 ` rearnsha at gcc dot gnu dot org
6 siblings, 0 replies; 10+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-04-04 12:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from rearnsha at gcc dot gnu dot org 2009-04-04 12:25 -------
Subject: Bug 39501
Author: rearnsha
Date: Sat Apr 4 12:25:06 2009
New Revision: 145537
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145537
Log:
PR target/39501
* arm.md (movsfcc): Disable if not TARGET_HARD_FLOAT.
* testsuite/gcc.c-torture/execute/pr39501.c: New file.
* testsuite/gcc.c-torture/execute/pr39501.x: New file.
Added:
branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr39501.c
branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr39501.x
Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/config/arm/arm.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi
2009-03-19 13:31 [Bug target/39501] New: -O -ffinite-math-only gets min(x,y) optimization wrong for SF " martinwguy at yahoo dot it
` (5 preceding siblings ...)
2009-04-04 12:25 ` rearnsha at gcc dot gnu dot org
@ 2009-05-16 22:25 ` rearnsha at gcc dot gnu dot org
6 siblings, 0 replies; 10+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-05-16 22:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rearnsha at gcc dot gnu dot org 2009-05-16 22:25 -------
Subject: Bug 39501
Author: rearnsha
Date: Sat May 16 22:24:59 2009
New Revision: 147623
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147623
Log:
PR target/39501
* arm.md (movsfcc): Disable if not TARGET_HARD_FLOAT.
* testsuite/gcc.c-torture/execute/pr39501.c: New file.
* testsuite/gcc.c-torture/execute/pr39501.x: New file.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/execute/pr39501.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/execute/pr39501.x
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/config/arm/arm.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-04-28 14:02 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-39501-4@http.gcc.gnu.org/bugzilla/>
2010-12-03 11:04 ` [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float on arm-*-gnueabi ramana at gcc dot gnu.org
2010-12-03 14:46 ` martinwguy at gmail dot com
2014-04-28 14:02 ` ramana at gcc dot gnu.org
2009-03-19 13:31 [Bug target/39501] New: -O -ffinite-math-only gets min(x,y) optimization wrong for SF " martinwguy at yahoo dot it
2009-04-04 10:37 ` [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for soft-float " rearnsha at gcc dot gnu dot org
2009-04-04 11:23 ` martinwguy at yahoo dot it
2009-04-04 11:50 ` martinwguy at yahoo dot it
2009-04-04 11:53 ` steven at gcc dot gnu dot org
2009-04-04 12:00 ` steven at gcc dot gnu dot org
2009-04-04 12:25 ` rearnsha at gcc dot gnu dot org
2009-05-16 22:25 ` rearnsha at gcc dot gnu dot 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).