From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1505 invoked by alias); 8 Jan 2015 15:12:51 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 1400 invoked by uid 48); 8 Jan 2015 15:12:42 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/64536] [4.9/5 Regression] Undefined .L* symbol starting with jump2 on s390x Date: Thu, 08 Jan 2015 15:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg00481.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64536 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ebotcazou at gcc dot gnu.org --- Comment #1 from Jakub Jelinek --- So, we have bb 6: (note 180 23 24 6 [bb 6] NOTE_INSN_BASIC_BLOCK) (insn 24 180 25 6 (set (reg:DI 1 %r1 [orig:88 b ] [88]) (zero_extend:DI (reg:SI 1 %r1 [orig:85 b+4 ] [85]))) method-to-ir3.i:15 184 {*zero_extendsidi2} (nil)) (insn 25 24 289 6 (set (reg:DI 1 %r1 [orig:88 b ] [88]) (ashift:DI (reg:DI 1 %r1 [orig:88 b ] [88]) (const_int 3 [0x3]))) method-to-ir3.i:15 570 {*ashldi3} (nil)) (insn 289 25 27 6 (set (reg/f:DI 2 %r2 [158]) (mem/c:DI (plus:DI (reg/f:DI 15 %r15) (const_int 184 [0xb8])) [5 %sfp+-8 S8 A64])) method-to-ir3.i:15 63 {*movdi_64} (nil)) (insn 27 289 28 6 (set (reg:DI 1 %r1 [87]) (mem/u/c:DI (plus:DI (reg/f:DI 2 %r2 [158]) (reg:DI 1 %r1 [orig:88 b ] [88])) [0 S8 A8])) method-to-ir3.i:15 63 {*movdi_64} (expr_list:REG_EQUAL (mem/u/c:DI (plus:DI (reg:DI 1 %r1 [orig:88 b ] [88]) (label_ref:DI 29)) [0 S8 A8]) (nil))) (jump_insn 28 27 29 6 (parallel [ (set (pc) (plus:DI (reg/f:DI 2 %r2 [158]) (reg:DI 1 %r1 [87]))) (use (label_ref 29)) ]) method-to-ir3.i:15 626 {casesi_jump} (expr_list:REG_DEAD (reg/f:DI 2 %r2 [158]) (expr_list:REG_DEAD (reg:DI 1 %r1 [87]) (nil))) -> 29) with: (code_label 29 28 30 7 "" [2 uses]) (jump_table_data 30 29 31 (addr_diff_vec:DI (label_ref:DI 29) [ (label_ref:DI 50) (label_ref:DI 50) (label_ref:DI 50) (label_ref:DI 50) ] (const_int 0 [0]) (const_int 0 [0]))) after it (outside of bb) (as all the case labels do the same thing, they have been jump threaded, but unfortunately not at GIMPLE, but only at RTL level) and post_order_compute calls tidy_fallthru_edges which calls tidy_fallthru_edge on the only successor edge from bb 6 (6 -> 9, bb 9 is the bb starting with code_label 50). When all the jump_table_data labels point to the same destination, it is reasonable to optimize that to direct jump, but I guess we need to take care about making sure that the code_label before the jump_table_data is only removed when it has zero LABEL_NUSES.