public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/25114] New: [m68k] Inefficient inequality comparisons with small integers
@ 2005-11-27 2:36 kazu at gcc dot gnu dot org
2005-11-27 23:31 ` [Bug target/25114] [m68k] Suboptimal " kazu at gcc dot gnu dot org
2005-11-28 5:05 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: kazu at gcc dot gnu dot org @ 2005-11-27 2:36 UTC (permalink / raw)
To: gcc-bugs
Consider:
unsigned int bar (void);
void
foo (void)
{
unsigned int a = bar ();
if (a <= 3)
bar ();
}
./cc1 -quiet -O2 -fomit-frame-pointer generates
foo:
move.l %a2,-(%sp)
lea bar,%a2
jbsr (%a2)
moveq #3,%d1
cmp.l %d0,%d1
jbcs .L4
jbsr (%a2)
.L4:
move.l (%sp)+,%a2
rts
Note that
moveq #3,%d1
cmp.l %d0,%d1
jbcs .L4
can be replaced with
lsr.l #2,%d0
jbne .L4
This bug depends on PR 25113 because GCC needs to know that lsr.l sets
the zero flag correctly.
--
Summary: [m68k] Inefficient inequality comparisons with small
integers
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at gcc dot gnu dot org
GCC target triplet: m68k-elf
BugsThisDependsOn: 25113
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25114
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/25114] [m68k] Suboptimal inequality comparisons with small integers
2005-11-27 2:36 [Bug target/25114] New: [m68k] Inefficient inequality comparisons with small integers kazu at gcc dot gnu dot org
@ 2005-11-27 23:31 ` kazu at gcc dot gnu dot org
2005-11-28 5:05 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: kazu at gcc dot gnu dot org @ 2005-11-27 23:31 UTC (permalink / raw)
To: gcc-bugs
--
kazu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25114
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/25114] [m68k] Suboptimal inequality comparisons with small integers
2005-11-27 2:36 [Bug target/25114] New: [m68k] Inefficient inequality comparisons with small integers kazu at gcc dot gnu dot org
2005-11-27 23:31 ` [Bug target/25114] [m68k] Suboptimal " kazu at gcc dot gnu dot org
@ 2005-11-28 5:05 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-28 5:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-28 05:05 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-11-28 05:05:10
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25114
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-28 5:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-27 2:36 [Bug target/25114] New: [m68k] Inefficient inequality comparisons with small integers kazu at gcc dot gnu dot org
2005-11-27 23:31 ` [Bug target/25114] [m68k] Suboptimal " kazu at gcc dot gnu dot org
2005-11-28 5:05 ` 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).