From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7188 invoked by alias); 16 Mar 2004 00:07:03 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 7161 invoked from network); 16 Mar 2004 00:07:03 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 16 Mar 2004 00:07:03 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i2G06v07019153; Mon, 15 Mar 2004 19:06:57 -0500 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i2G06uj13621; Mon, 15 Mar 2004 19:06:56 -0500 Received: from [10.0.0.106] (dnovillo.cipe.redhat.com [10.0.0.106]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id i2G06txo030866; Mon, 15 Mar 2004 19:06:55 -0500 Subject: Re: [lno] [RFC] if-conversion and auto vectorizer From: Diego Novillo To: Devang Patel Cc: Richard Henderson , "gcc@gcc.gnu.org list" In-Reply-To: <1F5C2707-76DD-11D8-B445-000393A91CAA@apple.com> References: <7F249017-7628-11D8-A9FC-003065FC08E4@spies.com> <20040315223807.GA4850@redhat.com> <74CCC879-76D5-11D8-B445-000393A91CAA@apple.com> <20040315232029.GB5053@redhat.com> <1F5C2707-76DD-11D8-B445-000393A91CAA@apple.com> Content-Type: text/plain Organization: Red Hat Canada Message-Id: <1079395578.3173.423.camel@localhost.localdomain> Mime-Version: 1.0 Date: Tue, 16 Mar 2004 00:07:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00757.txt.bz2 On Mon, 2004-03-15 at 19:01, Devang Patel wrote: > > if (test) > > T_1 = *p; > > else > > T_2 = 0; > > T_3 = PHI (T_1, T_2); > > > > cannot be transformed to > > > > T_1 = *p; > > T_3 = test ? T_1 : 0; > > unless you can show either that (1) dereferencing *p will never trap, > > or (2) some other dereference of *p dominates this test. Similar > > examples can be shown with arithmetic such as divide, or fp arithmetic > > without -ffast-math (i.e. when we can't discount NaNs). > > We also need to consider possible side effects of 'test' itself. > Not in GIMPLE. If 'test' is used in a predicate like the above, it should be a GIMPLE scalar. Diego.