From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20953 invoked by alias); 10 Feb 2014 19:03:00 -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 20916 invoked by uid 48); 10 Feb 2014 19:02:57 -0000 From: "law at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/60131] [4.9 Regression] RTL check fail in rhs_regno Date: Mon, 10 Feb 2014 19:03: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.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: law at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: law at redhat dot com X-Bugzilla-Target-Milestone: 4.9.0 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: 2014-02/txt/msg00990.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60131 --- Comment #4 from Jeffrey A. Law --- The problem here is we first have the following candidate and defining insn: gdb) p debug_rtx (cand->insn) (insn 24 23 25 6 (set (reg:DI 0 ax [orig:100 D.2269 ] [100]) (zero_extend:DI (reg/v:SI 0 ax [orig:91 v ] [91]))) j.c:22 133 {*zero_extendsidi2} (nil)) $13 = void (gdb) p debug_rtx (curr_insn) (insn 33 32 35 7 (set (reg/v:SI 0 ax [orig:91 v ] [91]) (sign_extend:SI (reg:HI 0 ax [orig:88 D.2271 ] [88]))) j.c:19 146 {extendhisi2} (nil)) We eliminate insn 24 by changing insn 33 into: (insn 33 32 35 7 (set (reg:DI 0 ax) (zero_extend:DI (sign_extend:SI (reg:HI 0 ax [orig:88 D.2271 ] [88])))) j.c:19 -1 (nil)) Later we call combine_reaching_defs to see if we can eliminate insn 33. It now has an unexpected form and we trigger the checking fault.