From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8984 invoked by alias); 9 Jun 2009 15:19:03 -0000 Received: (qmail 8947 invoked by uid 48); 9 Jun 2009 15:18:44 -0000 Date: Tue, 09 Jun 2009 15:19:00 -0000 Message-ID: <20090609151844.8946.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/39284] Computed gotos combined too aggressively In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "hubicka at gcc dot gnu dot org" 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 X-SW-Source: 2009-06/txt/msg00557.txt.bz2 ------- Comment #11 from hubicka at gcc dot gnu dot org 2009-06-09 15:18 ------- Hmm, it is not exactly load. In first case I get: (code_label 12524 16482 12523 70 1249 "" [4 uses]) (note 12523 12524 149 70 [bb 70] NOTE_INSN_BASIC_BLOCK) (insn:TI 149 12523 13690 70 ../src/Include/ceval-vm.i:47 (set (mem/c:SI (plus:SI (reg/f:SI 6 bp) (const_int -64 [0xffffffffffffffc0])) [72 %sfp+-40 S4 A32]) (const_int 1 [0x1])) 47 {*movsi_1} (expr_list:REG_EQUAL (const_int 1 [0x1]) (nil))) (insn 13690 149 1351 70 (set (reg/v:SI 0 ax [orig:155 why ] [155]) (const_int 1 [0x1])) 47 {*movsi_1} (nil)) (code_label 1351 13690 1352 71 382 "" [0 uses]) (note 1352 1351 1353 71 [bb 71] NOTE_INSN_BASIC_BLOCK) (jump_insn:TI 1353 1352 1354 71 ../src/Python/ceval.c:1000 (set (pc) (mem/c:SI (plus:SI (reg/f:SI 6 bp) (const_int -60 [0xffffffffffffffc4])) [72 %sfp+-36 S4 A32])) 640 {*indirect_jump} (nil)) (barrier 1354 1353 1477) So there are 4 edges reaching WHY set. In the second case it is move of WHY to 1: (code_label 1363 1365 1349 150 384 "" [127 uses]) (note 1349 1363 1350 150 [bb 150] NOTE_INSN_BASIC_BLOCK) (insn:TI 1350 1349 19980 150 ../src/Python/ceval.c:1000 (set (reg/v:SI 0 ax [orig:155 why ] [155]) (const_int 1 [0x1])) 47 {*movsi_1} (nil)) (note 19980 1350 19979 151 [bb 151] NOTE_INSN_BASIC_BLOCK) (jump_insn 19979 19980 19982 151 ../src/Python/ceval.c:1000 (set (pc) (mem/c:SI (plus:SI (reg/f:SI 6 bp) (const_int -60 [0xffffffffffffffc4])) [72 %sfp+-36 S4 A32])) 640 {*indirect_jump} (nil)) (barrier 19982 19979 1373) that prevents duplicating. Probably ordirnary bb-reorder should be convincable to handle this well? This don't seem to happen at 64bit compilation. I also posted the patch fixing optimize_for_size check -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39284