From patchwork Wed Jun 16 10:33:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikael Pettersson X-Patchwork-Id: 55869 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 66E2E1007D2 for ; Wed, 16 Jun 2010 20:46:02 +1000 (EST) Received: (qmail 25880 invoked by alias); 16 Jun 2010 10:46:00 -0000 Received: (qmail 25871 invoked by uid 22791); 16 Jun 2010 10:45:59 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, TW_SV, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fanny.its.uu.se (HELO fanny.its.uu.se) (130.238.4.241) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Jun 2010 10:45:54 +0000 Received: by fanny.its.uu.se (Postfix, from userid 212) id E818C1143A; Wed, 16 Jun 2010 12:41:22 +0200 (MSZ) Received: from fanny.its.uu.se(127.0.0.1) by fanny.its.uu.se via virus-scan id s143623; Wed, 16 Jun 10 12:41:06 +0200 Received: from pilspetsen.it.uu.se (pilspetsen.it.uu.se [130.238.18.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by fanny.its.uu.se (Postfix) with ESMTP id A7786A22A for ; Wed, 16 Jun 2010 12:33:34 +0200 (MSZ) Received: (from mikpe@localhost) by pilspetsen.it.uu.se (8.13.8+Sun/8.13.8) id o5GAXYMu023477; Wed, 16 Jun 2010 12:33:34 +0200 (MEST) MIME-Version: 1.0 Message-ID: <19480.43134.61768.905494@pilspetsen.it.uu.se> Date: Wed, 16 Jun 2010 12:33:34 +0200 From: Mikael Pettersson To: gcc-patches@gcc.gnu.org Subject: [PATCH, testsuite, powerpc] fix slp-perm-{5, 6}.c regression (PR testsuite/44538) 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 This fixes a powerpc testsuite regression on trunk and 4.5. The fix for PR43949 improved VRP, causing initialization loops in two vectorization test cases (gcc.dg/vect/slp-perm-{5,6}.c) to also be vectorized. The scan-tree-dump-times check then sees too many "vectorized 1 loops" messages, and fails. Fixed by placing asm (""); markers in the initialization loops, as suggested by Richard Guenther in the PR entry. Tested on powerpc-linux where it eliminated the new FAILs for gcc.dg/vect/slp-perm-{5,6}.c. There was no change in testsuite results on x86_64-linux; the patch does have the same effect on x86_64 with regard to the number of vectorized loops, but x86_64 is not a vect_perm target so the number of vectorized loops is not actually checked there. Ok for trunk and 4.5? (I don't have svn write access.) /Mikael gcc/testsuite/ 2010-06-16 Mikael Pettersson PR testsuite/44538 * gcc.dg/vect/slp-perm-5.c (main): Prevent initialization loop from being vectorized. * gcc.dg/vect/slp-perm-6.c (main): Likewise. --- gcc-4.6-20100612/gcc/testsuite/gcc.dg/vect/slp-perm-5.c.~1~ 2008-09-04 12:41:50.000000000 +0200 +++ gcc-4.6-20100612/gcc/testsuite/gcc.dg/vect/slp-perm-5.c 2010-06-15 22:08:10.000000000 +0200 @@ -63,6 +63,7 @@ int main (int argc, const char* argv[]) output2[i] = 0; if (input[i] > 256) abort (); + __asm__ volatile (""); } foo (input, output, input2, output2); --- gcc-4.6-20100612/gcc/testsuite/gcc.dg/vect/slp-perm-6.c.~1~ 2008-09-04 12:41:50.000000000 +0200 +++ gcc-4.6-20100612/gcc/testsuite/gcc.dg/vect/slp-perm-6.c 2010-06-15 22:08:10.000000000 +0200 @@ -62,6 +62,7 @@ int main (int argc, const char* argv[]) output2[i] = 0; if (input[i] > 256) abort (); + __asm__ volatile (""); } foo (input, output, input2, output2);