From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27159 invoked by alias); 16 Feb 2015 21:19:44 -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 26903 invoked by uid 48); 16 Feb 2015 21:19:40 -0000 From: "law at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/44281] [4.8/4.9/5 Regression] Global Register variable pessimisation Date: Mon, 16 Feb 2015 21:19: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: 4.5.0 X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: law at redhat dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: vmakarov at redhat dot com X-Bugzilla-Target-Milestone: 4.8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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-02/txt/msg01832.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44281 --- Comment #18 from Jeffrey A. Law --- In reference to c#10 and c#14, we get from the trunk: 0: ff 65 08 jmpq *0x8(%rbp) 3: 66 66 66 66 2e 0f 1f data32 data32 data32 nopw %cs:0x0(%rax,%rax,1) a: 84 00 00 00 00 00 0000000000000010 : 10: 4c 8b 55 08 mov 0x8(%rbp),%r10 14: 48 8d 6d 08 lea 0x8(%rbp),%rbp 18: 41 ff e2 jmpq *%r10 1b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000000020 : 20: 48 8b 45 08 mov 0x8(%rbp),%rax 24: 48 83 c5 08 add $0x8,%rbp 28: ff e0 jmpq *%rax 2a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 0000000000000030 : 30: 48 8b 45 08 mov 0x8(%rbp),%rax 34: 48 83 c5 08 add $0x8,%rbp 38: ff e0 jmpq *%rax Which is better than the code reference in c#14 and c#10 in each case. This was probably Kai's code to improve our indirect jump support in the backend. We also still get the desired code for push_flag_into_local_var. The only issue left is the poor code for push_flag_into_global_reg_var.