This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/45223] New: RTL PRE GCSE pass hoists trapping insn out of loop
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Aug 2010 08:24:35 -0000
- Subject: [Bug rtl-optimization/45223] New: RTL PRE GCSE pass hoists trapping insn out of loop
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This is a follow-up from PR38819 which partially fixes this problem. The
problem remains in RTL optimization passes, and can be triggered on targets
that implement modulo instruction in the hardware (i.e. moxie-elf).
The testcase from PR38819 compiles with -O2 to:
main:
push $sp, $r6
push $sp, $r7
push $sp, $r8
push $sp, $r9
push $sp, $r10
push $sp, $r11
dec $sp, 24
lda.l $r7, a
lda.l $r0, b
xor $r6, $r6
ldi.l $r11, foo
> mod.l $r7, $r0
ldi.l $r10, 8
ldi.l $r8, 99
jmpa .L4
.L3:
...
Since b is initialized to zero, mod.l instruction traps.
--
Summary: RTL PRE GCSE pass hoists trapping insn out of loop
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ubizjak at gmail dot com
GCC target triplet: moxie-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45223