From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11093 invoked by alias); 15 Jun 2011 17:47:04 -0000 Received: (qmail 11081 invoked by uid 22791); 15 Jun 2011 17:47:03 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from qmta02.westchester.pa.mail.comcast.net (HELO qmta02.westchester.pa.mail.comcast.net) (76.96.62.24) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Jun 2011 17:46:44 +0000 Received: from omta12.westchester.pa.mail.comcast.net ([76.96.62.44]) by qmta02.westchester.pa.mail.comcast.net with comcast id wHm41g0050xGWP852HmkLK; Wed, 15 Jun 2011 17:46:44 +0000 Received: from up.mrs.kithrup.com ([24.4.193.8]) by omta12.westchester.pa.mail.comcast.net with comcast id wHmh1g02F0BKwT43YHmiSw; Wed, 15 Jun 2011 17:46:43 +0000 Subject: Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10)) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Mike Stump In-Reply-To: Date: Wed, 15 Jun 2011 18:57:00 -0000 Cc: Richard Guenther , Jason Merrill , gcc-patches List Content-Transfer-Encoding: quoted-printable Message-Id: References: <4DEDB98F.6010508@redhat.com> <4DEE2DCF.7020905@redhat.com> <4DEE3484.8030101@redhat.com> <4DF11FBC.3010304@redhat.com> <4DF223D4.3080700@redhat.com> <4DF22656.9050700@redhat.com> <37B61697-B4A5-49B6-87C4-AD361A86F752@comcast.net> To: Richard Guenther 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-06/txt/msg01177.txt.bz2 On Jun 15, 2011, at 2:04 AM, Richard Guenther wrote: > This VIEW_CONVERT_EXPR looks useless - in fact useless_type_conversion_p > will tell you that, so you can omit it. So, I tracked down who created it: tree convert_to_vector (tree type, tree expr) { switch (TREE_CODE (TREE_TYPE (expr))) { case INTEGER_TYPE: case VECTOR_TYPE: if (!tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (expr= )))) { error ("can%'t convert between vector values of different size"); return error_mark_node; } =3D> return build1 (VIEW_CONVERT_EXPR, type, expr); If people want to not create useless conversions in the first place, though= , I suspect there are lots of places that create useless conversions in the= compiler.