From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115954 invoked by alias); 22 Sep 2015 09:03: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 115915 invoked by uid 48); 22 Sep 2015 09:03:39 -0000 From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/66790] Invalid uninitialized register handling in REE Date: Tue, 22 Sep 2015 09: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: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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-09/txt/msg01768.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790 --- Comment #30 from Eric Botcazou --- > GEN and KILL are not the same for LR and MIR. > > 1) Sets and clobbers are handled differently. A set or clobber of r1 > _kills_ liveness, while for MIR sets _generate_ "initialized-ness" and only > clobbers kill it. > > 2) A use of r1 _creates_ liveness (which extends up, until it reaches the > sets for all reaching definitions of that use), while uses of r1 are > irrelevant for MIR. > > 3) For LR, GEN must override KILL if an insn has both a set and a use of r1. > For MIR, you cannot have a GEN (set) and a KILL (clobber) in the same insn. The issue is not LR vs MIR, it's the may-initialized part of LIVE vs MIR. It seem to me that the GEN and KILL of the may-initialized part of LIVE should be the same as those of MIR, since the difference between the 2 problems is only at the global level. Pierre-Marie's patch duplicates them, but ideally they should be factored and reused.