From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3829 invoked by alias); 12 Jan 2010 22:22:03 -0000 Received: (qmail 3790 invoked by alias); 12 Jan 2010 22:21:53 -0000 Date: Tue, 12 Jan 2010 22:22:00 -0000 Message-ID: <20100112222153.3789.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/42691] problematic REG_EQUAL note added to SUBREG In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jingyu at google dot com" 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: 2010-01/txt/msg01422.txt.bz2 ------- Comment #5 from jingyu at google dot com 2010-01-12 22:21 ------- Subject: Re: problematic REG_EQUAL note added to SUBREG On Tue, Jan 12, 2010 at 12:57 AM, ebotcazou at gcc dot gnu dot org wrote: > > > ------- Comment #4 from ebotcazou at gcc dot gnu dot org  2010-01-12 08:57 ------- >> Then gcc comes to line3657. Since changed_i3_dest is 0, gcc does not >> call adjust_for_new_dest at all. >> >> line3657: >> if (changed_i3_dest) >>     { >>       PATTERN (i3) = newpat; >>       adjust_for_new_dest (i3); >>     } > > We should try and set changed_i3_dest to 1 in this particular case as well. > > Where does the dest get changed exactly? > In our example, GCC first sets the new pattern to "newpat". "newpat" actually points to the pattern of i2. At line3750, gcc records i3's note into "i3notes" and propagates the note if shared. Then at line3775, gcc assigns newpat to i3. At line3775 (combine.c): INSN_CODE (i3) = insn_code_number; PATTERN (i3) = newpat; At line3837, REG_NOTES (i3) = 0; At line3879, "i3notes" is distributed back to i3. >> I did not read the entire combine pass. So I am not sure whether it is >> fine to just add something like this after line3062 where >> recog_for_combine is called. >> >>           if (insn_code_number >= 0) >>             changed_i3_dest = 1; > > Too big a hammer, the dest of I3 is generally not changed. > >> Another option to fix this problem is not to attach REG_EQUAL note to >> "set subreg reg" at all during forward propagation. > > Too big a hammer as well, the note is correct at this point. > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42691 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42691