From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100757 invoked by alias); 14 Oct 2015 16:29:49 -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 100746 invoked by uid 89); 14 Oct 2015 16:29:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 14 Oct 2015 16:29:48 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 1A254541996; Wed, 14 Oct 2015 18:29:44 +0200 (CEST) Date: Wed, 14 Oct 2015 16:29:00 -0000 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Add VIEW_CONVERT_EXPR to operand_equal_p Message-ID: <20151014162944.GE16672@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-10/txt/msg01388.txt.bz2 Hi, this patch adds VIEW_CONVERT_EXPR which is another code omitted in operand_equal_p. During bootstrap there are about 1000 matches. Bootstrapped/regtested x86_64-linux, OK? Honza * fold-const.c (operand_equal_p): Handle VIEW_CONVERT_EXPR. Index: fold-const.c =================================================================== --- fold-const.c (revision 228735) +++ fold-const.c (working copy) @@ -2962,6 +2968,12 @@ operand_equal_p (const_tree arg0, const_ case IMAGPART_EXPR: return OP_SAME (0); + case VIEW_CONVERT_EXPR: + if (!(flags & (OEP_ADDRESS_OF | OEP_CONSTANT_ADDRESS_OF)) + && !types_compatible_p (TREE_TYPE (arg0), TREE_TYPE (arg1))) + return false; + return OP_SAME (0); + case TARGET_MEM_REF: case MEM_REF: if (!(flags & (OEP_ADDRESS_OF | OEP_CONSTANT_ADDRESS_OF)))