public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/48156] [4.6/4.7 Regression] wrong code with -fcrossjumping Date: Fri, 18 Mar 2011 12:46:00 -0000 [thread overview] Message-ID: <bug-48156-4-67BbfXk0ui@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-48156-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48156 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bernds at gcc dot gnu.org, | |bonzini at gnu dot org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-18 12:42:33 UTC --- The problem is that try_head_merge_bb uses DF info that isn't up to date after previous crossjumping and hasn't been updated yet. In particular when we compute live_union, one merge_bb is: ;; basic block 4, loop depth 0, count 0 ;; prev block 3, next block 5 ;; pred: 3 [20.7%] (fallthru) ;; succ: 7 [100.0%] ;; bb 4 artificial_defs: { } ;; bb 4 artificial_uses: { u-1(7){ }} ;; lr in 3 [bx] 7 [sp] ;; lr use 3 [bx] 7 [sp] ;; lr def 0 [ax] 1 [dx] 2 [cx] 4 [si] 5 [di] 8 [st] 9 [st(1)] 10 [st(2)] 11 [st(3)] 12 [st(4)] 13 [st(5)] 14 [st(6)] 15 [st(7)] 17 [flags] 18 [fpsr] 19 [fpcr] 21 [xmm0] 22 [xmm1] 23 [xmm2] 24 [xmm3] 25 [xmm4] 26 [xmm5] 27 [xmm6] 28 [xmm7] 29 [mm0] 30 [mm1] 31 [mm2] 32 [mm3] 33 [mm4] 34 [mm5] 35 [mm6] 36 [mm7] 37 [r8] 38 [r9] 39 [r10] 40 [r11] 45 [xmm8] 46 [xmm9] 47 [xmm10] 48 [xmm11] 49 [xmm12] 50 [xmm13] 51 [xmm14] 52 [xmm15] (note 24 23 25 4 [bb 4] NOTE_INSN_BASIC_BLOCK) (insn 25 24 26 4 (set (reg:SI 4 si) (reg/v:SI 3 bx [orig:59 i ] [59])) pr48156.c:31 64 {*movsi_internal} (expr_list:REG_DEAD (reg/v:SI 3 bx [orig:59 i ] [59]) (nil))) (insn 26 25 62 4 (set (reg:SI 5 di) (const_int 8 [0x8])) pr48156.c:31 64 {*movsi_internal} (nil)) (jump_insn 62 26 63 4 (set (pc) (label_ref 61)) -1 (nil) -> 61) ;; lr out 7 [sp] where lr_out is obviously wrong, lr out should also include 4 [si] 5 [di]. That lr_out comes from the bb that originally also included the call to baz which consumed and made dead those two registers. The other merge_bb has exactly the same problem. bb 7 (the new bb which contains just the call to baz) has lr in/use/def/out all empty. So I guess we need to tell DF to recompute it after each successful crossjumping or recompute it somehow manually.
next prev parent reply other threads:[~2011-03-18 12:43 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-03-16 20:36 [Bug rtl-optimization/48156] New: " zsojka at seznam dot cz 2011-03-17 0:22 ` [Bug rtl-optimization/48156] " steven at gcc dot gnu.org 2011-03-17 0:58 ` steven at gcc dot gnu.org 2011-03-17 9:42 ` rguenth at gcc dot gnu.org 2011-03-18 10:50 ` jakub at gcc dot gnu.org 2011-03-18 10:57 ` jakub at gcc dot gnu.org 2011-03-18 12:46 ` jakub at gcc dot gnu.org [this message] 2011-03-18 12:47 ` jakub at gcc dot gnu.org 2011-03-18 13:37 ` jakub at gcc dot gnu.org 2011-03-18 14:16 ` jakub at gcc dot gnu.org 2011-03-18 16:36 ` bonzini at gnu dot org 2011-03-19 17:12 ` steven at gcc dot gnu.org 2011-03-20 15:35 ` jakub at gcc dot gnu.org 2011-03-20 16:46 ` [Bug rtl-optimization/48156] [4.6 " jakub at gcc dot gnu.org 2011-03-21 2:45 ` jakub at gcc dot gnu.org 2011-03-26 9:24 ` jakub at gcc dot gnu.org 2011-03-26 11:41 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-48156-4-67BbfXk0ui@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).