From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13518 invoked by alias); 25 Aug 2011 07:34:37 -0000 Received: (qmail 12797 invoked by uid 22791); 25 Aug 2011 07:34:35 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SINGLE_HEADER_2K X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 25 Aug 2011 07:34:19 +0000 Received: by yxl11 with SMTP id 11so1561262yxl.20 for ; Thu, 25 Aug 2011 00:34:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.252.31 with SMTP id z31mr518919ybh.364.1314257659070; Thu, 25 Aug 2011 00:34:19 -0700 (PDT) Received: by 10.150.57.5 with HTTP; Thu, 25 Aug 2011 00:34:18 -0700 (PDT) In-Reply-To: References: <4E4D224F.1020206@redhat.com> Date: Thu, 25 Aug 2011 09:58:00 -0000 Message-ID: Subject: Re: Vector Comparison patch From: Richard Guenther To: Artem Shinkarov Cc: Richard Henderson , gcc-patches@gcc.gnu.org, "Joseph S. Myers" , Uros Bizjak Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-08/txt/msg02027.txt.bz2 On Thu, Aug 25, 2011 at 8:20 AM, Artem Shinkarov wrote: > Here is a cleaned-up patch without the hook. Mostly it works in a way > we discussed. > > So I think it is a right time to do something about vcond patterns, > which would allow me to get rid of conversions that I need to put all > over the code. > > Also at the moment the patch breaks lto frontend with a simple example: > #define vector(elcount, type) =A0\ > __attribute__((vector_size((elcount)*sizeof(type)))) type > > int main (int argc, char *argv[]) { > =A0 =A0vector (4, float) f0; > =A0 =A0vector (4, float) f1; > > =A0 =A0f0 =3D =A0f1 !=3D f0 > =A0 =A0 =A0 =A0 =A0? (vector (4, float)){-1,-1,-1,-1} : (vector (4, float= )){0,0,0,0}; > > =A0 =A0return (int)f0[argc]; > } > > test-lto.c:8:14: internal compiler error: in convert, at lto/lto-lang.c:1= 244 > > I looked into the file, the conversion function is defined as > gcc_unreachable (). I am not very familiar with lto, so I don't really > know what is the right way to treat the conversions. convert cannot be called from the middle-end, instead use fold_convert. > And I seriously need help with backend patterns. I'll look at the patch in detail later today. Richard. > > Thanks, > Artem. >