From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12489 invoked by alias); 17 Dec 2005 15:14:05 -0000 Received: (qmail 12467 invoked by uid 48); 17 Dec 2005 15:14:03 -0000 Date: Sat, 17 Dec 2005 15:14:00 -0000 Message-ID: <20051217151403.12466.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/25130] [4.1/4.2 Regression] miscompilation in GCSE In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "steven at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2005-12/txt/msg01785.txt.bz2 List-Id: ------- 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 ._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 ._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