From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19219 invoked by alias); 25 May 2011 14:47:42 -0000 Received: (qmail 19199 invoked by uid 22791); 25 May 2011 14:47:40 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,TW_VB X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 May 2011 14:47:20 +0000 Received: by wye20 with SMTP id 20so7008372wye.20 for ; Wed, 25 May 2011 07:47:19 -0700 (PDT) Received: by 10.227.208.77 with SMTP id gb13mr4704779wbb.43.1306334838951; Wed, 25 May 2011 07:47:18 -0700 (PDT) Received: from [192.168.32.37] (fw-lnat.cambridge.arm.com [217.140.96.63]) by mx.google.com with ESMTPS id p16sm418552wbh.36.2011.05.25.07.47.16 (version=SSLv3 cipher=OTHER); Wed, 25 May 2011 07:47:17 -0700 (PDT) Message-ID: <4DDD1675.8010008@linaro.org> Date: Wed, 25 May 2011 15:27:00 -0000 From: Ramana Radhakrishnan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: gcc-patches CC: Patch Tracking Subject: [Patch ARM] Actually generate vorn and vbic instructions. Content-Type: multipart/mixed; boundary="------------040400050906010408050404" 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-05/txt/msg01873.txt.bz2 This is a multi-part message in MIME format. --------------040400050906010408050404 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 537 Hi, A co-worker pointed out that we weren't generating vorn and vbic instructions for Neon and I had a look. Tests are still running and will commit to trunk if there are no regressions. cheers Ramana 2011-05-25 Ramana Radhakrishnan * config/arm/neon.md ("orn3_neon"): Canonicalize not. ("orndi3_neon"): Likewise. ("bic3_neon"): Likewise. 2011-05-25 Ramana Radhakrishnan * gcc.target/arm/neon-vorn-vbic.c: New file. --------------040400050906010408050404 Content-Type: text/plain; name="neon-vorn-vbic.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="neon-vorn-vbic.txt" Content-length: 2209 Index: gcc/config/arm/neon.md =================================================================== --- gcc/config/arm/neon.md (revision 174174) +++ gcc/config/arm/neon.md (working copy) @@ -794,8 +794,8 @@ (define_insn "orn3_neon" [(set (match_operand:VDQ 0 "s_register_operand" "=w") - (ior:VDQ (match_operand:VDQ 1 "s_register_operand" "w") - (not:VDQ (match_operand:VDQ 2 "s_register_operand" "w"))))] + (ior:VDQ (not:VDQ (match_operand:VDQ 2 "s_register_operand" "w")) + (match_operand:VDQ 1 "s_register_operand" "w")))] "TARGET_NEON" "vorn\t%0, %1, %2" [(set_attr "neon_type" "neon_int_1")] @@ -803,8 +803,8 @@ (define_insn "orndi3_neon" [(set (match_operand:DI 0 "s_register_operand" "=w,?=&r,?&r") - (ior:DI (match_operand:DI 1 "s_register_operand" "w,r,0") - (not:DI (match_operand:DI 2 "s_register_operand" "w,0,r"))))] + (ior:DI (not:DI (match_operand:DI 2 "s_register_operand" "w,0,r")) + (match_operand:DI 1 "s_register_operand" "w,r,0")))] "TARGET_NEON" "@ vorn\t%P0, %P1, %P2 @@ -816,8 +816,8 @@ (define_insn "bic3_neon" [(set (match_operand:VDQ 0 "s_register_operand" "=w") - (and:VDQ (match_operand:VDQ 1 "s_register_operand" "w") - (not:VDQ (match_operand:VDQ 2 "s_register_operand" "w"))))] + (and:VDQ (not:VDQ (match_operand:VDQ 2 "s_register_operand" "w")) + (match_operand:VDQ 1 "s_register_operand" "w")))] "TARGET_NEON" "vbic\t%0, %1, %2" [(set_attr "neon_type" "neon_int_1")] --- /dev/null 2011-05-18 14:49:12.916256701 +0100 +++ ./gcc/testsuite/gcc.target/arm/neon-vorn-vbic.c 2011-05-25 11:17:09.966726432 +0100 @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_neon_ok } */ +/* { dg-options "-O2 -ftree-vectorize" } */ +/* { dg-add-options arm_neon } */ + +void bor (int *__restrict__ c, int *__restrict__ a, int *__restrict__ b) +{ + int i; + for (i=0;i<9;i++) + c[i] = b[i] | (~a[i]); +} +void bic (int *__restrict__ c, int *__restrict__ a, int *__restrict__ b) +{ + int i; + for (i=0;i<9;i++) + c[i] = b[i] & (~a[i]); +} + +/* { dg-final { scan-assembler "vorn\\t" } } */ +/* { dg-final { scan-assembler "vbic\\t" } } */ --------------040400050906010408050404--