This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/42522] (zero_extract:SI (mem:QI) ...) misoptimized
- From: "mikpe at it dot uu.se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 19 Feb 2012 23:48:41 +0000
- Subject: [Bug rtl-optimization/42522] (zero_extract:SI (mem:QI) ...) misoptimized
- Auto-submitted: auto-generated
- References: <bug-42522-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42522
Mikael Pettersson <mikpe at it dot uu.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu.se
--- Comment #16 from Mikael Pettersson <mikpe at it dot uu.se> 2012-02-19 23:48:41 UTC ---
Since r171341 (a big complex optabs cleanup patch) trunk aka 4.7 generates
bar:
move.l 4(%sp),%a0
tst.b (%a0)
jne .L3
clr.l %d1
move.b 1(%a0),%d1
swap %d1
clr.w %d1
clr.l %d0
move.b 2(%a0),%d0
lsl.l #8,%d0
or.l %d1,%d0
or.b 3(%a0),%d0
moveq #8,%d1
cmp.l %d0,%d1
scs %d0
extb.l %d0
neg.l %d0
rts
.L3:
clr.l %d0
rts
for the m68k-elf target. (The code is much better for m68k-linux.)