From patchwork Fri Jul 16 18:29:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Bergner X-Patchwork-Id: 59121 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id C0FECB6EFE for ; Sat, 17 Jul 2010 04:30:13 +1000 (EST) Received: (qmail 19033 invoked by alias); 16 Jul 2010 18:30:10 -0000 Received: (qmail 19018 invoked by uid 22791); 16 Jul 2010 18:30:08 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL, BAYES_00, SPF_SOFTFAIL, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e35.co.us.ibm.com (HELO e35.co.us.ibm.com) (32.97.110.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Jul 2010 18:30:02 +0000 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by e35.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o6GILwSR012967 for ; Fri, 16 Jul 2010 12:21:58 -0600 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o6GITxrA153604 for ; Fri, 16 Jul 2010 12:29:59 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o6GITx6g012104 for ; Fri, 16 Jul 2010 12:29:59 -0600 Received: from [9.76.77.135] (sig-9-76-77-135.mts.ibm.com [9.76.77.135]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o6GITq5L011884; Fri, 16 Jul 2010 12:29:55 -0600 Subject: [PATCH] Fix testsuite test cases slp-perm-[1234].c From: Peter Bergner To: gcc-patches Date: Fri, 16 Jul 2010 13:29:38 -0500 Message-ID: <1279304978.3166.1105.camel@otta> Mime-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Sometime recently (r161984?) the compiler is now vectorizing the initialization loops for slp-perm.[123].c on powerpc64-linux. I copied the method of really disabling vectorization in the initialization loops used in PR testsuite/44538 by adding a asm ("") into the loops we don't want vectorized. For safety, I did the same for the check_results loops. Looking closer, I also noticed the loop limits for the check_results loop were bogus for slp-perm-[34].c, so I fixed those too. Ok for mainline? Peter * gcc.dg/vect/slp-perm-1.c (main): Make sure loops aren't vectorized. * gcc.dg/vect/slp-perm-2.c (main): Likewise. * gcc.dg/vect/slp-perm-3.c (main): Likewise. Fix loop limit. * gcc.dg/vect/slp-perm-4.c (main): Fix loop limit. Index: gcc.dg/vect/slp-perm-1.c =================================================================== --- gcc.dg/vect/slp-perm-1.c (revision 162190) +++ gcc.dg/vect/slp-perm-1.c (working copy) @@ -42,16 +42,18 @@ int main (int argc, const char* argv[]) for (i = 0; i < N; i++) { input[i] = i%256; - if (input[i] > 200) - abort(); output[i] = 0; + __asm__ volatile (""); } foo (input, output); for (i = 0; i < N; i++) - if (output[i] != check_results[i]) - abort (); + { + if (output[i] != check_results[i]) + abort (); + __asm__ volatile (""); + } return 0; } Index: gcc.dg/vect/slp-perm-2.c =================================================================== --- gcc.dg/vect/slp-perm-2.c (revision 162190) +++ gcc.dg/vect/slp-perm-2.c (working copy) @@ -37,16 +37,18 @@ int main (int argc, const char* argv[]) for (i = 0; i < N; i++) { input[i] = i%256; - if (input[i] > 200) - abort(); output[i] = 0; + __asm__ volatile (""); } foo (input, output); for (i = 0; i < N; i++) - if (output[i] != check_results[i]) - abort (); + { + if (output[i] != check_results[i]) + abort (); + __asm__ volatile (""); + } return 0; } Index: gcc.dg/vect/slp-perm-3.c =================================================================== --- gcc.dg/vect/slp-perm-3.c (revision 162190) +++ gcc.dg/vect/slp-perm-3.c (working copy) @@ -51,16 +51,18 @@ int main (int argc, const char* argv[]) for (i = 0; i < N; i++) { input[i] = i%256; - if (input[i] > 200) - abort(); output[i] = 0; + __asm__ volatile (""); } foo (input, output); - for (i = 0; i < N - N; i++) - if (output[i] != check_results[i]) - abort (); + for (i = 0; i < N; i++) + { + if (output[i] != check_results[i]) + abort (); + __asm__ volatile (""); + } return 0; } Index: gcc.dg/vect/slp-perm-4.c =================================================================== --- gcc.dg/vect/slp-perm-4.c (revision 162190) +++ gcc.dg/vect/slp-perm-4.c (working copy) @@ -74,7 +74,7 @@ int main (int argc, const char* argv[]) foo (input, output); - for (i = 0; i < N - N; i++) + for (i = 0; i < N; i++) if (output[i] != check_results[i]) abort ();