From patchwork Thu May 12 13:26:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Revital Eres X-Patchwork-Id: 1464 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:52:10 -0000 Delivered-To: patches@linaro.org Received: by 10.224.61.3 with SMTP id r3cs106345qah; Thu, 12 May 2011 06:26:34 -0700 (PDT) Received: by 10.14.38.14 with SMTP id z14mr73668eea.169.1305206794058; Thu, 12 May 2011 06:26:34 -0700 (PDT) Received: from mail-ew0-f50.google.com (mail-ew0-f50.google.com [209.85.215.50]) by mx.google.com with ESMTPS id b31si560653wen.207.2011.05.12.06.26.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 May 2011 06:26:32 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.50 is neither permitted nor denied by best guess record for domain of revital.eres@linaro.org) client-ip=209.85.215.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.215.50 is neither permitted nor denied by best guess record for domain of revital.eres@linaro.org) smtp.mail=revital.eres@linaro.org Received: by ewy10 with SMTP id 10so493984ewy.37 for ; Thu, 12 May 2011 06:26:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.33.67 with SMTP id g3mr648344ebd.13.1305206792009; Thu, 12 May 2011 06:26:32 -0700 (PDT) Received: by 10.213.108.203 with HTTP; Thu, 12 May 2011 06:26:31 -0700 (PDT) Date: Thu, 12 May 2011 16:26:31 +0300 Message-ID: Subject: [PR testsuite/47013] Fix SMS testsuite faliures From: Revital Eres To: ro@CeBiTec.Uni-Bielefeld.DE Cc: gcc-patches@gcc.gnu.org, Patch Tracking Hello, The attached patch fixes SMS testsuite failures seen on PowerPC and SPU. Tested ppc64-redhat-linux on both with -m32,-m64 and SPU. OK for mainline? Thanks, Revital testsuite/Changelog PR rtl-optimization/47013 * gcc.dg/sms-2.c: Change scan-tree-dump-times and the code itself to preserve the function. * gcc.dg/sms-6.c: Add --param sms-min-sc=1 -fmodulo-sched-allow-regmoves, and -mno-update for PowerPC. * gcc.dg/sms-3.c: Add --param sms-min-sc=1 and -fmodulo-sched-allow-regmoves flags. * gcc.dg/sms-7.c: Add -fmodulo-sched-allow-regmoves and --param sms-min-sc=1 flags and -mno-update for PowerPC. Increase the SMS succeeded loops for the SPU. * gcc.dg/sms-4.c: Add --param sms-min-sc=1 -mno-update for PowerPC. * gcc.dg/sms-8.c: Add --param sms-min-sc=1 and -m32 for PowerPC. Change scan-rtl-dump-times for PowerPC. * gcc.dg/sms-5.c: Add --param sms-min-sc=1 flag and -mno-update for PowerPC. Index: testsuite/gcc.dg/sms-2.c =================================================================== --- testsuite/gcc.dg/sms-2.c (revision 173693) +++ testsuite/gcc.dg/sms-2.c (working copy) @@ -4,12 +4,11 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms" } */ - +int th, h, em, nlwm, nlwS, nlw, sy; void fun (nb) int nb; { - int th, h, em, nlwm, nlwS, nlw, sy; while (nb--) while (h--) @@ -33,5 +32,5 @@ fun (nb) } } -/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* powerpc*-*-* } } } */ +/* { dg-final { scan-rtl-dump-times "SMS loop many exits" 1 "sms" { target spu-*-* powerpc*-*-* } } } */ /* { dg-final { cleanup-rtl-dump "sms" } } */ Index: testsuite/gcc.dg/sms-6.c =================================================================== --- testsuite/gcc.dg/sms-6.c (revision 173693) +++ testsuite/gcc.dg/sms-6.c (working copy) @@ -1,5 +1,7 @@ /* { dg-do run } */ -/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms" } */ +/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param sms-min-sc=1 " } */ +/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms -mno-update --param sms-min-sc=1 -fmodulo-sched-allow-regmoves " { target powerpc*-*-*} } */ + extern void abort (void); Index: testsuite/gcc.dg/sms-3.c =================================================================== --- testsuite/gcc.dg/sms-3.c (revision 173693) +++ testsuite/gcc.dg/sms-3.c (working copy) @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O2 -fmodulo-sched -funroll-loops -fdump-rtl-sms" } */ +/* { dg-options "-O2 -fmodulo-sched -funroll-loops -fdump-rtl-sms --param sms-min-sc=1 -fmodulo-sched-allow-regmoves" } */ extern void abort (void); Index: testsuite/gcc.dg/sms-7.c =================================================================== --- testsuite/gcc.dg/sms-7.c (revision 173693) +++ testsuite/gcc.dg/sms-7.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do run } */ -/* { dg-options "-O2 -fmodulo-sched -fstrict-aliasing -fdump-rtl-sms" } */ +/* { dg-options "-O3 -fmodulo-sched -fstrict-aliasing -fdump-rtl-sms -fmodulo-sched-allow-regmoves --param sms-min-sc=1" } */ +/* { dg-options "-O2 -fmodulo-sched -fstrict-aliasing -fdump-rtl-sms --param sms-min-sc=1 -mno-update -fmodulo-sched-allow-regmoves" { target powerpc*-*-*} } */ extern void abort (void); @@ -44,7 +45,7 @@ int main() return 0; } -/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* } } } */ +/* { dg-final { scan-rtl-dump-times "SMS succeeded" 2 "sms" { target spu-*-* } } } */ /* { dg-final { scan-rtl-dump-times "SMS succeeded" 3 "sms" { target powerpc*-*-* } } } */ /* { dg-final { cleanup-rtl-dump "sms" } } */ Index: testsuite/gcc.dg/sms-4.c =================================================================== --- testsuite/gcc.dg/sms-4.c (revision 173693) +++ testsuite/gcc.dg/sms-4.c (working copy) @@ -1,6 +1,7 @@ /* Inspired from sbitmap_a_or_b_and_c_cg function in sbitmap.c. */ /* { dg-do run } */ -/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */ +/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms " } */ +/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms --param sms-min-sc=1 -mno-update" { target powerpc*-*-*} } */ extern void abort (void); Index: testsuite/gcc.dg/sms-8.c =================================================================== --- testsuite/gcc.dg/sms-8.c (revision 173693) +++ testsuite/gcc.dg/sms-8.c (working copy) @@ -3,7 +3,8 @@ that was not fixed by reg-moves. */ /* { dg-do run } */ - /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */ + /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms --param sms-min-sc=1" } */ + /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms --param sms-min-sc=1 -m32" { target powerpc*-*-*} } */ extern void abort (void); @@ -35,7 +36,7 @@ main () return 0; } -/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target powerpc*-*-* } } } */ +/* { dg-final { scan-rtl-dump-times "SMS loop with subreg in lhs" 1 "sms" { target powerpc-*-* } } } */ /* { dg-final { cleanup-rtl-dump "sms" } } */ Index: testsuite/gcc.dg/sms-5.c =================================================================== --- testsuite/gcc.dg/sms-5.c (revision 173693) +++ testsuite/gcc.dg/sms-5.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do run } */ -/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -funroll-loops -fdump-rtl-sms" } */ +/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -funroll-loops -fdump-rtl-sms --param sms-min-sc=1" } */ + /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -funroll-loops -fdump-rtl-sms -mno-update --param sms-min-sc=1" { target powerpc*-*-*} } */ /* This is the same test as loop-2e.c test. It is related to a fix in the generation of the prolog and epilog. */