https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30315
Vincent Lefèvre changed:
What|Removed |Added
CC||vincent-gcc at vinc17 dot net
---
--- Comment #19 from ubizjak at gmail dot com 2009-11-16 19:05 ---
(In reply to comment #18)
This bug also still appears in 4.4.2 with --with-arch=pentium3.
pentium3 fails because it is not TARGET_HIMODE_MATH and TARGET_QIMODE_MATH.
So, it fails following testcase:
unsigned short
--- Comment #18 from jparmele at wildbear dot com 2009-11-12 17:28 ---
This bug also still appears in 4.4.2 with --with-arch=pentium3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30315
--- Comment #17 from pinskia at gcc dot gnu dot org 2009-01-02 19:29
---
* gcc.target/i386/pr30315.c: New.
This testcase fails with -march=pentium-m turned on.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30315
--- Comment #16 from rask at gcc dot gnu dot org 2007-11-10 01:32 ---
Two testcases which aren't optimized:
unsigned int bad1 (unsigned int a)
{
unsigned int c = a - 1;
if (c a)
abort ();
else
return c;
}
unsigned int bad2 (unsigned int a)
{
unsigned int c = a - 2;
--- Comment #15 from rask at gcc dot gnu dot org 2007-09-09 19:22 ---
Subject: Bug 30315
Author: rask
Date: Sun Sep 9 19:21:59 2007
New Revision: 128305
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=128305
Log:
PR target/30315
* config/i386/i386.h
--- Comment #14 from patchapp at dberlin dot org 2007-08-30 19:45 ---
Subject: Bug number PR 30315
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-08/msg02217.html
--
--- Comment #12 from rask at gcc dot gnu dot org 2007-08-19 13:00 ---
void *foo(unsigned a, unsigned b) {
unsigned sum = a + b;
if (sum a) return 0;
if (sum == 0) sum = 1;
To be able to optimize both comparisons, we need to have the same comparison
operands. The only
--- Comment #13 from ubizjak at gmail dot com 2007-08-19 18:03 ---
(In reply to comment #12)
if (sum == 0) sum = 1;
Additionally, the resulting asm seems to be a bit stupid:
testl %edx, %edx
movl$1, %eax
cmove %eax, %edx
should
--- Comment #11 from raeburn at raeburn dot org 2007-08-18 17:55 ---
Snapshot gcc-4.3-20070817 seems to do just fine with the sample code I
supplied.
Though perhaps I should've given a bigger test case... :-)
One of the places where I'd want to check for overflow is in computing
--- Comment #10 from rask at gcc dot gnu dot org 2007-08-14 14:39 ---
Subject: Bug 30315
Author: rask
Date: Tue Aug 14 14:39:24 2007
New Revision: 127481
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=127481
Log:
PR target/30315
* config/i386/i386.h
--- Comment #9 from patchapp at dberlin dot org 2007-08-04 13:10 ---
Subject: Bug number PR target/30315
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00242.html
--
--- Comment #8 from patchapp at dberlin dot org 2007-08-03 19:40 ---
Subject: Bug number PR target/30315
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00204.html
--
--- Comment #7 from rask at sygehus dot dk 2007-06-13 13:36 ---
Looking at this again, I don't think the transformation I'm making with the
splitter is valid, because I'm making up a zero extension which wasn't there to
begin with. The upper part could have been non-zero before the
--- Comment #2 from ubizjak at gmail dot com 2007-06-06 08:15 ---
(In reply to comment #0)
After the addition, which sets the ALU flags, the compiler issues two compare
instructions and conditional branches. This sequence could be replaced by a
conditional branch following the
And BTW - wrapping is undefined operation.
One for signed integers for unsigned it is actually defined as
wrapping and the reporter used unsigned integers here.
Thanks,
Andrew Pinski
--- Comment #3 from pinskia at gmail dot com 2007-06-06 09:10 ---
Subject: Re: optimize unsigned-add overflow test on x86 to use cpu flags from
addl
And BTW - wrapping is undefined operation.
One for signed integers for unsigned it is actually defined as
wrapping and the reporter
--- Comment #4 from rask at sygehus dot dk 2007-06-06 10:33 ---
I see no reason to mark this enhancement request as invalid.
As to generating reasonable x86 code for overflow checks written in C, it
isn't completely hopeless. I did an experiment with my 16-bit x86 port. First,
I
--- Comment #5 from ubizjak at gmail dot com 2007-06-06 13:00 ---
(In reply to comment #4)
I see no reason the i386 back end can't be improved in a similiar fashion.
Interesting...
I agree that this bugreport can be an enhancement request for the code you
provided. We can perhaps
--- Comment #6 from raeburn at raeburn dot org 2007-06-06 14:51 ---
Subject: Re: optimize unsigned-add overflow test on x86 to use cpu flags from
addl
On Jun 6, 2007, at 04:15, ubizjak at gmail dot com wrote:
in config/i386/i386-modes.def, documentation says:
Add CCGOC to
--- Comment #1 from scovich at gmail dot com 2007-06-06 03:39 ---
Happens on x86_64-unknown-linux-gnu as well, for both 4.2.0 and 4.3 (20070605)
The problem is even worse for 128-bit arithmetic because it has to check two
registers (with associated branches) before making a decision.
21 matches
Mail list logo