This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/25130] [4.1/4.2 Regression] miscompilation in GCSE
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Dec 2005 15:14:03 -0000
- Subject: [Bug rtl-optimization/25130] [4.1/4.2 Regression] miscompilation in GCSE
- References: <bug-25130-702@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from steven at gcc dot gnu dot org 2005-12-17 15:14 -------
It looks like we're missing a memory modification. Yes, making this a load PRE
problem after all, despite it failing for me even with -fno-gcse-lm, but oh
well.
I have these expressions in the table:
Expression hash table (11 buckets, 3 entries)
Index 0 (hash value 7)
(mem/s/j:SI (plus:SI (reg/f:SI 20 frame)
(const_int -8 [0xfffffff8])) [0 <variable>._M_impl._M_start_node+0 S4
A32])
Index 1 (hash value 10)
(mem/s/j/c:SI (plus:SI (reg/f:SI 20 frame)
(const_int -16 [0xfffffff0])) [0 clusters.D.1846._M_impl._M_start_cur+0
S4 A32])
Index 2 (hash value 3)
(mem/s/j:SI (plus:SI (reg/f:SI 20 frame)
(const_int -12 [0xfffffff4])) [0 <variable>._M_impl._M_start_node+0 S4
A32])
The second and third expressions don't do much. For the first expression we
apply load PRE. But the local data flow sets look wrong. For TRANSP I have,
transp
0
000
1
111
2
000
3
111
4
000
and block 3 for me looks like this:
;; Start of basic block 3, registers live: (nil)
(code_label 57 94 58 3 8 "" [1 uses])
(note 58 57 59 3 [bb 3] NOTE_INSN_BASIC_BLOCK)
(note 59 58 60 3 ("t.C") 55)
(insn 60 59 96 3 t.C:55 (parallel [
(set (mem/s/j/c:SI (plus:SI (reg/f:SI 20 frame)
(const_int -8 [0xfffffff8])) [0
clusters.D.1846._M_impl._M_finish_cur+0 S4 A32])
(plus:SI (mem/s/j/c:SI (plus:SI (reg/f:SI 20 frame)
(const_int -8 [0xfffffff8])) [0
clusters.D.1846._M_impl._M_finish_cur+0 S4 A32])
(const_int 4 [0x4])))
(clobber (reg:CC 17 flags))
]) 148 {*addsi_1} (nil)
(nil))
(jump_insn 96 60 97 3 (set (pc)
(label_ref 61)) -1 (nil)
(nil))
;; End of basic block 3, registers live:
(nil)
Looks to me that insn 60 should cause expression 1 to not be in TRANSP for this
basic block.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25130