public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/14237] suboptimal comparison between long and long long
[not found] <bug-14237-5009@http.gcc.gnu.org/bugzilla/>
@ 2006-01-15 20:26 ` pinskia at gcc dot gnu dot org
2009-04-22 22:20 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-15 20:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2006-01-15 20:26 -------
Hmm, we get:
foo:
movl 4(%esp), %edx
xorl %ecx, %ecx
movl $1, %eax
cmpl g+4, %ecx
jb .L3
cmpl g, %edx
jb .L3
ret
.p2align 2,,3
.L3:
xorl %eax, %eax
ret
-----
The only thing which is semi wrong now is:
xorl %ecx, %ecx
cmpl g+4, %ecx
Everything else looks good (well except on ppc where we still get the different
compares).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14237
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug rtl-optimization/14237] suboptimal comparison between long and long long
[not found] <bug-14237-5009@http.gcc.gnu.org/bugzilla/>
2006-01-15 20:26 ` [Bug rtl-optimization/14237] suboptimal comparison between long and long long pinskia at gcc dot gnu dot org
@ 2009-04-22 22:20 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-22 22:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2009-04-22 22:20 -------
We now get:
foo:
movl $1, %eax
movl g+4, %edx
testl %edx, %edx
jne .L3
movl 4(%esp), %edx
cmpl g, %edx
jb .L3
ret
.p2align 2,,3
.L3:
xorl %eax, %eax
ret
Fixed and has been fixed since 4.3.0.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14237
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug optimization/14237] New: suboptimal comparison between long and long long
@ 2004-02-21 10:53 kazu at cs dot umass dot edu
2004-11-03 18:14 ` [Bug rtl-optimization/14237] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 3+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-02-21 10:53 UTC (permalink / raw)
To: gcc-bugs
unsigned long long g;
unsigned long
foo (unsigned long a)
{
return (a >= g) ? 1 : 0;
}
turns into
foo:
pushl %esi ; we wouldn't need this if %esi were untouched
movl g+4, %ecx
xorl %esi, %esi
pushl %ebx
cmpl %ecx, %esi ; we could use "testl" here because %esi == 0
movl 12(%esp), %ebx
movl $1, %eax
movl g, %edx
jb .L3
cmpl %edx, %ebx
jae .L2
.L3:
xorl %eax, %eax
.L2:
popl %ebx
popl %esi
ret
--
Summary: suboptimal comparison between long and long long
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14237
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-22 22:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-14237-5009@http.gcc.gnu.org/bugzilla/>
2006-01-15 20:26 ` [Bug rtl-optimization/14237] suboptimal comparison between long and long long pinskia at gcc dot gnu dot org
2009-04-22 22:20 ` pinskia at gcc dot gnu dot org
2004-02-21 10:53 [Bug optimization/14237] New: " kazu at cs dot umass dot edu
2004-11-03 18:14 ` [Bug rtl-optimization/14237] " pinskia 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).