From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2141 invoked by alias); 15 Jan 2016 19:58:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 2045 invoked by uid 89); 15 Jan 2016 19:58:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=tom_devries@mentor.com, Tom_deVriesmentorcom, Tom_deVries@mentor.com, tom_devriesmentorcom X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 15 Jan 2016 19:58:36 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46268) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1aKAW2-0001aU-J9 for gcc-patches@gnu.org; Fri, 15 Jan 2016 14:58:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKAW1-0004dh-9m for gcc-patches@gnu.org; Fri, 15 Jan 2016 14:58:34 -0500 Received: from mail-io0-x235.google.com ([2607:f8b0:4001:c06::235]:35892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKAW1-0004dd-5M for gcc-patches@gnu.org; Fri, 15 Jan 2016 14:58:33 -0500 Received: by mail-io0-x235.google.com with SMTP id g73so303923953ioe.3 for ; Fri, 15 Jan 2016 11:58:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=E3KGyABK8Gg7dj4IC3QDaOc7Lr/NcU1dYAnceITozrA=; b=cTVPBNGYhXV/20L/7IplrpW6544kLqOubrchCuxboC9Vr2R1031YCNwe81RRXWkA7a DopF77SFvDSnlf3HSc5X39FC3O/1eXc+XRYema9F23yoBVfiFeU/vqWVomg5EojKUvEG 9eZa65DrW5N0t+gsh9TyXvPtEqElnvnGEwr6Zs4mWlkHT78VtstG4mhQgttJL2E45tOL wS031hL52OSGCI27H4QfDdBJvGIOJngS8ijtbXxlTGKtDHrLcOskpxwJocgzu3DSknFp fJelgpydTbVGwjoj4xSPMcPsRJEvpXmtX12aaVVRDAX8YMpf2iOIF/tBtSSAMGYvT2+h OeRA== X-Gm-Message-State: ALoCoQkOG6ukcx4vXdhEzPElAhSHshJdOajy2wXhXRdHAUpCGe/PGPuj71dmHNRJTslP45U2W1ZuwliQyBv03A/lrKlRJBlE3g== X-Received: by 10.107.132.221 with SMTP id o90mr13599340ioi.137.1452887912220; Fri, 15 Jan 2016 11:58:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.138.97 with HTTP; Fri, 15 Jan 2016 11:57:52 -0800 (PST) In-Reply-To: References: <5698FB0F.3090908@mentor.com> From: Sebastian Pop Date: Fri, 15 Jan 2016 19:58:00 -0000 Message-ID: Subject: Re: [PATCH, PR68976] Use reaching def phi arg in sese_add_exit_phis_edge To: Tom de Vries Cc: Tobias Grosser , "gcc-patches@gnu.org" Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c06::235 X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg01140.txt.bz2 On Fri, Jan 15, 2016 at 11:19 AM, Sebastian Pop wrote: > On Fri, Jan 15, 2016 at 7:58 AM, Tom de Vries wrote: >> During scop detection/canonicalize_loop_closed_ssa_form, an exit phi is >> introduced in the loop for _24: >> ... >> : >> # _58 = PHI <_24(22)> >> ... >> Note that _24 is not defined in the loop, but before it. AFAIU the header >> comment of canonicalize_loop_closed_ssa_form, this phi is not needed. That >> might be the root cause of the bug, > > I think that may be the problem, as it is invariant in the loops, so > it is considered to be a parameter of the scop. > Let me see if we could avoid adding that phi node in the first place. I just sent out a patch that implements this. Thanks Tom for pointing out the issue!