From patchwork Wed Sep 17 20:15:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 390547 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4E78114008B for ; Thu, 18 Sep 2014 06:16:40 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=fuhHqXAIfgfITKthA v2D+GrgHTIZFm0fC4O6jwqkaTdPt9fsoC6Ea25yI/qyNrcIGQPZ2Exzbk8KMgHTx GU2T9pQF96k26Q7wONKiG5rvRIxpYvujJl4kG+UxIYia36rim4V/e4rITPFGboep Ikz2Wtb+d53TtQsnk2NJM9wla8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=uQFO2iAN8qqPf2+W0aUlX9p 5F74=; b=R77Jgj/6AxzOgyvSVOR5hEpqlNjB/g1ST1pBVroCNhOH1vwDAjeCUJ3 Om2ExmH1EXDWKj6Pzrqvk7fz4oOW6IOFP5KVeUt3uc4/3txY7m/hxIzxabQvEt/c XY3eD39nbVrbKQuv20gvkH1Ry6icB3tG0HKa5h9fBP4y93YFWwLc= Received: (qmail 9067 invoked by alias); 17 Sep 2014 20:16:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 9058 invoked by uid 89); 17 Sep 2014 20:16:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 17 Sep 2014 20:16:31 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XULeM-0004OC-O3 from Bernd_Schmidt@mentor.com ; Wed, 17 Sep 2014 13:16:26 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Wed, 17 Sep 2014 21:16:25 +0100 Message-ID: <5419EBD2.6080606@codesourcery.com> Date: Wed, 17 Sep 2014 22:15:14 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.0 MIME-Version: 1.0 To: Richard Biener CC: GCC Patches Subject: Re: ptx preliminary address space fixes [4/4] References: <54117596.1070309@codesourcery.com> In-Reply-To: On 09/11/2014 01:41 PM, Richard Biener wrote: > On Thu, Sep 11, 2014 at 12:12 PM, Bernd Schmidt wrote: >> This one isn't a wrong-code issue, just a missed optimization. The strlen >> optimizations need to be made to look through ADDR_SPACE_CONVERT_EXPR to >> work on ptx. >> >> Bootstrapped and tested together with the other patches on x86_64-linux. >> Ok? > > Did you try adding ADDR_SPACE_CONVERT_EXPR to the tree codes > handled in gimple_assign_cast_p? I did now (full test on x86_64, and also tested with ptx), and that also appears to work. Ok? Bernd diff --git a/gcc/gimple.h b/gcc/gimple.h index ec41585..8d4032b 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -2384,9 +2384,10 @@ gimple_assign_cast_p (const_gimple s) if (is_gimple_assign (s)) { enum tree_code sc = gimple_assign_rhs_code (s); - return CONVERT_EXPR_CODE_P (sc) - || sc == VIEW_CONVERT_EXPR - || sc == FIX_TRUNC_EXPR; + return (CONVERT_EXPR_CODE_P (sc) + || sc == VIEW_CONVERT_EXPR + || sc == FIX_TRUNC_EXPR + || sc == ADDR_SPACE_CONVERT_EXPR); } return false;