From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10972 invoked by alias); 18 Sep 2015 13:55:43 -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 10960 invoked by uid 89); 18 Sep 2015 13:55:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Sep 2015 13:55:42 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-11-qocC5wUlTx-bs2NA0A59Qw-1; Fri, 18 Sep 2015 14:55:37 +0100 Received: from [10.1.26.27] ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 18 Sep 2015 14:55:36 +0100 User-Agent: Microsoft-MacOutlook/14.5.4.150722 Date: Fri, 18 Sep 2015 14:14:00 -0000 Subject: Re: [PATCH] vectorizing conditional expressions (PR tree-optimization/65947) From: Alan Hayward To: Alan Lawrence , Richard Biener CC: "gcc-patches@gcc.gnu.org" Message-ID: References: <55FC110D.1070806@arm.com> In-Reply-To: <55FC110D.1070806@arm.com> Mime-version: 1.0 X-MC-Unique: qocC5wUlTx-bs2NA0A59Qw-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-09/txt/msg01416.txt.bz2 On 18/09/2015 14:26, "Alan Lawrence" wrote: >On 18/09/15 13:17, Richard Biener wrote: >> >> Ok, I see. >> >> That this case is already vectorized is because it implements MAX_EXPR, >> modifying it slightly to >> >> int foo (int *a) >> { >> int val =3D 0; >> for (int i =3D 0; i < 1024; ++i) >> if (a[i] > val) >> val =3D a[i] + 1; >> return val; >> } >> >> makes it no longer handled by current code. >> > >Yes. I believe the idea for the patch is to handle arbitrary expressions >like > >int foo (int *a) >{ > int val =3D 0; > for (int i =3D 0; i < 1024; ++i) > if (some_expression (i)) > val =3D another_expression (i); > return val; >} Yes, that=E2=80=99s correct. Hopefully my new test cases should cover every= thing. Alan.