From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11989 invoked by alias); 17 Aug 2011 12:49:25 -0000 Received: (qmail 11979 invoked by uid 22791); 17 Aug 2011 12:49:25 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,TW_WW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (94.185.240.25) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Wed, 17 Aug 2011 12:49:07 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 17 Aug 2011 13:49:04 +0100 Received: from [10.1.67.65] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 17 Aug 2011 13:49:00 +0100 Message-ID: <4E4BB8BC.6070908@arm.com> Date: Wed, 17 Aug 2011 13:54:00 -0000 From: Richard Earnshaw User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Ira Rosen CC: "gcc-patches@gcc.gnu.org" , Ramana Radhakrishnan , Patch Tracking Subject: Re: [patch, ARM] Change default vector size to 128 bits - take 3 References: In-Reply-To: X-MC-Unique: 111081713490400301 Content-Type: text/plain; charset=WINDOWS-1252 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/msg01401.txt.bz2 On 16/08/11 10:28, Ira Rosen wrote: > Hi, >=20 > This patch changes the default vector size for auto-vectorization on > ARM NEON to 128 bits. This new version is a result of a discussion > with Richard and Ramana. >=20 > wwwdocs changes will follow shortly. >=20 > Bootstrapped and tested on arm-linux-gnueabi. The testsuite changes > were also checked on powerpc64-suse-linux and x86_64-suse-linux. >=20 > There is one new failure: > gcc.c-torture/execute/mode-dependent-address.c fails with -O3 > -funroll-loops with this patch or with -mvectorize-with-neon-quad. > Ramana has a patch to fix this > http://gcc.gnu.org/ml/gcc/2011-08/msg00284.html. I will wait with > committing my patch until this issue is resolved. >=20 > OK for mainline? >=20 > Thanks, > Ira >=20 > ChangeLog: >=20 > * config/arm/arm.c (arm_preferred_simd_mode): Check > TARGET_NEON_VECTORIZE_DOUBLE instead of > TARGET_NEON_VECTORIZE_QUAD. > (arm_expand_sync): Likewise. > * config/arm/arm.opt (mvectorize-with-neon-quad): Make inverse > mask of mvectorize-with-neon-double. Add RejectNegative. > (mvectorize-with-neon-double): New. >=20 > testsuite/ChangeLog: >=20 > * lib/target-supports.exp (check_effective_target_vect_multiple_sizes): > New procedure. > (add_options_for_quad_vectors): Replace with ... > (add_options_for_double_vectors): ... this. > * gfortran.dg/vect/pr19049.f90: Expect more printings on targets that > support multiple vector sizes since the vectorizer attempts to > vectorize with both vector sizes. > * gcc.dg/vect/no-vfa-vect-79.c, > gcc.dg/vect/no-vfa-vect-102a.c, gcc.dg/vect/vect-outer-1a.c, > gcc.dg/vect/vect-outer-1b.c, gcc.dg/vect/vect-outer-2b.c, > gcc.dg/vect/vect-outer-3a.c, gcc.dg/vect/no-vfa-vect-37.c, > gcc.dg/vect/vect-outer-3b.c, gcc.dg/vect/no-vfa-vect-101.c, > gcc.dg/vect/no-vfa-vect-102.c, gcc.dg/vect/vect-reduc-dot-s8b.c, > gcc.dg/vect/vect-outer-1.c, gcc.dg/vect/vect-104.c: Likewise. > * gcc.dg/vect/vect-42.c: Run with 64 bit vectors if applicable. > * gcc.dg/vect/vect-multitypes-6.c, gcc.dg/vect/vect-52.c, > gcc.dg/vect/vect-54.c, gcc.dg/vect/vect-46.c, gcc.dg/vect/vect-48.c, > gcc.dg/vect/vect-96.c, gcc.dg/vect/vect-multitypes-3.c, > gcc.dg/vect/vect-40.c: Likewise. > * gcc.dg/vect/vect-outer-5.c: Remove quad-vectors option as > redundant. > * gcc.dg/vect/vect-109.c, gcc.dg/vect/vect-peel-1.c, > gcc.dg/vect/vect-peel-2.c, gcc.dg/vect/slp-25.c, > gcc.dg/vect/vect-multitypes-1.c, gcc.dg/vect/slp-3.c, > gcc.dg/vect/no-vfa-pr29145.c, gcc.dg/vect/vect-multitypes-4.c: > Likewise. > * gcc.dg/vect/vect-peel-4.c: Make ia global. >=20 Ok with the following change: > static unsigned int > arm_autovectorize_vector_sizes (void) > { > - return TARGET_NEON_VECTORIZE_QUAD ? 16 | 8 : 0; > + return TARGET_NEON_VECTORIZE_DOUBLE ? 0 : 16 | 8; > } Please put parentheses round the expression to make the precedence explicit. R.