From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19107 invoked by alias); 5 Feb 2013 13:57:33 -0000 Received: (qmail 18886 invoked by uid 48); 5 Feb 2013 13:56:57 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/56195] [4.8 Regression] Error: incorrect register `%rdi' used with `l' suffix (at -O2) Date: Tue, 05 Feb 2013 13:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2013-02/txt/msg00400.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56195 --- Comment #2 from Jakub Jelinek 2013-02-05 13:56:56 UTC --- Seems this is heavily related to the uninitialized uses, in (insn 90 87 91 22 (set (reg:CCGC 17 flags) (compare:CCGC (reg:SI 118 [ D.1797 ]) (mem:SI (reg/v/f:DI 59 [ q ]) [2 *q_1+0 S4 A32]))) pr56195.c:17 7 {*cmpsi_1} (nil)) both SI 118 and DI 59 pseudos are preinitialized to const0_rtx because both the address to read from and the other value are uninitialized. Guess LRA figures out that both operands are equal to const0_rtx, just doesn't handle the different modes properly (it can be cmpl (%rdi), %edi ).