From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13843 invoked by alias); 7 Feb 2012 09:22:14 -0000 Received: (qmail 13830 invoked by uid 22791); 7 Feb 2012 09:22:13 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Feb 2012 09:22:00 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/52060] [4.6/4.7 Regression] Invalid constant simplification in combine with parallel result Date: Tue, 07 Feb 2012 09:22: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-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.4 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: 2012-02/txt/msg00688.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52060 --- Comment #9 from Jakub Jelinek 2012-02-07 09:21:34 UTC --- (In reply to comment #7) > I'm a little uncomfortable with the patch, because I think it's annoying to > have to copy a pattern that you're going to substitute for. On the other hand, > given that combine_simplify_rtx is allowed to SUBST, that's the most reasonable > fix. Yeah, I'm also not very happy about it, but we do other copy_rtx calls (e.g. for i0pat/i1pat/i2pat), for the same reason. > Why do you need 2 copies of I0SRC though? Because it might be substed twice, once into i1pat (which might clobber it with random changes) and then again into i2pat, if both i1dest and i2dest are needed after the pattern. With the two separate variables we copy_rtx it only when we are actually going to use them in subst. Other alternative would be to create just one copy (i0src_copy) upfront if ((added_sets_1 && i0_feeds_i1_n) || (added_sets_2 && ((i0_feeds_i1_n && i1_feeds_i2_n) || (i0_feeds_i2_n)))) and then right before we subst it into i1pat check the second half of the condition again and if it is true, copy it again, but that would be IMHO uglier than this.