From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14245 invoked by alias); 23 Oct 2015 09:10:44 -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 14225 invoked by uid 89); 23 Oct 2015 09:10:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f173.google.com Received: from mail-yk0-f173.google.com (HELO mail-yk0-f173.google.com) (209.85.160.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 23 Oct 2015 09:10:38 +0000 Received: by ykaz22 with SMTP id z22so114278958yka.2 for ; Fri, 23 Oct 2015 02:10:36 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.49.211 with SMTP id x202mr16043072ywx.147.1445591436051; Fri, 23 Oct 2015 02:10:36 -0700 (PDT) Received: by 10.37.117.136 with HTTP; Fri, 23 Oct 2015 02:10:35 -0700 (PDT) In-Reply-To: <20151023051953.GA36466@kam.mff.cuni.cz> References: <20151014162944.GE16672@kam.mff.cuni.cz> <1833908.my5suBVC6X@polaris> <20151018160651.GA63497@kam.mff.cuni.cz> <21255721.Or0yReY6Nx@polaris> <20151019194102.GA48581@kam.mff.cuni.cz> <20151021040515.GA90615@kam.mff.cuni.cz> <20151023051953.GA36466@kam.mff.cuni.cz> Date: Fri, 23 Oct 2015 09:14:00 -0000 Message-ID: Subject: Re: Add VIEW_CONVERT_EXPR to operand_equal_p From: Richard Biener To: Jan Hubicka Cc: Eric Botcazou , GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg02393.txt.bz2 On Fri, Oct 23, 2015 at 7:19 AM, Jan Hubicka wrote: > Hello, > this is a variant of patch I tested. After looking into the issue more, I think we don't really need > to check types to be compatible (or we want to check it in other references, too). It seems to me > that we should be able to drop > /* Verify that access happens in similar types. */ > if (!types_compatible_p (TREE_TYPE (arg0), TREE_TYPE (arg1))) > return 0; > from MEM_REF, too. Yeah. > I had bit hard time creating a testcase running into an ICE > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68062 > With C FE I only know how to produce VCEs by vector conversions. Will play > with it more tomorrow. The code patch hits about 1k times during bootstrap. > > Bootstrapped/regtested ppc64-linux, OK? Ok. Thanks, Richard. > Index: fold-const.c > =================================================================== > --- fold-const.c (revision 228933) > +++ fold-const.c (working copy) > @@ -2960,6 +2962,7 @@ operand_equal_p (const_tree arg0, const_ > > case REALPART_EXPR: > case IMAGPART_EXPR: > + case VIEW_CONVERT_EXPR: > return OP_SAME (0); > > case TARGET_MEM_REF: