From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29246 invoked by alias); 7 Sep 2011 19:26:10 -0000 Received: (qmail 29236 invoked by uid 22791); 7 Sep 2011 19:26:09 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-gw0-f50.google.com (HELO mail-gw0-f50.google.com) (74.125.83.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Sep 2011 19:25:55 +0000 Received: by gwj16 with SMTP id 16so4659978gwj.9 for ; Wed, 07 Sep 2011 12:25:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.108.71 with SMTP id g7mr5521198icp.436.1315423554839; Wed, 07 Sep 2011 12:25:54 -0700 (PDT) Received: by 10.42.228.3 with HTTP; Wed, 7 Sep 2011 12:25:54 -0700 (PDT) In-Reply-To: References: Date: Wed, 07 Sep 2011 19:51:00 -0000 Message-ID: Subject: Re: [PATCH] Propagate out predicate inversions in forwprop From: Andrew Pinski To: Richard Guenther Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 X-SW-Source: 2011-09/txt/msg00525.txt.bz2 On Wed, Sep 7, 2011 at 4:46 AM, Richard Guenther wrote: > > This makes sure that we propagate comparisons that we cannot invert > into inverted conditions by swapping edges or the conditional ops. > For the testcase it transforms > > : > =C2=A0D.2724_4 =3D xx_2(D) < xy_3(D); > =C2=A0p_5 =3D (int) D.2724_4; > =C2=A0D.2725_6 =3D p_5 =3D=3D 0; > =C2=A0np_7 =3D (int) D.2725_6; > =C2=A0if (np_7 !=3D 0) > > to > > : > =C2=A0if (xx_2(D) < xy_3(D)) > > while without the patch we would be left with > > : > =C2=A0D.2724_4 =3D xx_2(D) < xy_3(D); > =C2=A0if (D.2724_4 =3D=3D 0) This sounds like PR 15558. Thanks, Andrew Pinski