This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/52484] New: Wrong code from ce3 pass (deletes insn)
- From: "gjl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 04 Mar 2012 19:50:19 +0000
- Subject: [Bug rtl-optimization/52484] New: Wrong code from ce3 pass (deletes insn)
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52484
Bug #: 52484
Summary: Wrong code from ce3 pass (deletes insn)
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: gjl@gcc.gnu.org
Target: avr
The following code for AVR target that reads from address space __memx result
in wrong code:
long readx (const __memx long *p)
{
return *p;
}
== compile ==
$ avr-gcc flash.c -S -dp -Os -mmcu=avr51 -da
== configure ==
../../gcc.gnu.org/trunk/configure --target=avr --prefix=/gnu/install/gcc-4.7
--disable-nls --with-dwarf2 --enable-checking=yes,rtl --enable-languages=c,c++
GNU C (GCC) version 4.8.0 20120304 (experimental) (avr)
SVN 184887 from 2012-03-04
To see the bug RTL dumps will follow.
There is really bloaty code from lower-subreg that splits the 4-byte move into
4 individual byte moves.
After pass .peephole2 there are 4 xload_qi_libgcc insns that perform these
moves.
After pass .ce3 one of these moves is gone, this is wrong because no byte must
be thrown away.