diff mbox

PR66669: Fix failure of gcc.dg/loop-8.c on Power

Message ID 57db91bc-c64f-d001-17e2-6d54c91611b7@linux.vnet.ibm.com
State New
Headers show

Commit Message

Kelvin Nilsen Jan. 23, 2017, 4:59 p.m. UTC
The test gcc.dg/loop-8.c makes assumptions that are not valid on Power
architecture (and on certain other architectures for which this issue
has already been addressed).  The test case assumes that a single
loop-invariant statement will be moved outside the loop.  On Power, a
constant is copy-propagated within the loop, and the subsequent
loop-invariant code motion moves two loop-invariant statements out of
the loop.

This patch simply disables this test case on Power architecture.


gcc/testsuite/ChangeLog:

2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/66669
	* gcc.dg/loop-8.c: Modify dg-skip-if directive to exclude this
	test on powerpc targets.

Comments

Jeff Law Jan. 23, 2017, 5:01 p.m. UTC | #1
On 01/23/2017 09:59 AM, Kelvin Nilsen wrote:
>
> The test gcc.dg/loop-8.c makes assumptions that are not valid on Power
> architecture (and on certain other architectures for which this issue
> has already been addressed).  The test case assumes that a single
> loop-invariant statement will be moved outside the loop.  On Power, a
> constant is copy-propagated within the loop, and the subsequent
> loop-invariant code motion moves two loop-invariant statements out of
> the loop.
>
> This patch simply disables this test case on Power architecture.
>
>
> gcc/testsuite/ChangeLog:
>
> 2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
>
> 	PR target/66669
> 	* gcc.dg/loop-8.c: Modify dg-skip-if directive to exclude this
> 	test on powerpc targets.
OK.
jeff
Kelvin Nilsen June 26, 2017, 10:13 p.m. UTC | #2
Is it ok to backport this patch to GCC-6?

On 01/23/2017 09:59 AM, Kelvin Nilsen wrote:
> 
> The test gcc.dg/loop-8.c makes assumptions that are not valid on Power
> architecture (and on certain other architectures for which this issue
> has already been addressed).  The test case assumes that a single
> loop-invariant statement will be moved outside the loop.  On Power, a
> constant is copy-propagated within the loop, and the subsequent
> loop-invariant code motion moves two loop-invariant statements out of
> the loop.
> 
> This patch simply disables this test case on Power architecture.
> 
> 
> gcc/testsuite/ChangeLog:
> 
> 2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
> 
> 	PR target/66669
> 	* gcc.dg/loop-8.c: Modify dg-skip-if directive to exclude this
> 	test on powerpc targets.
> 
> Index: gcc/testsuite/gcc.dg/loop-8.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/loop-8.c	(revision 244730)
> +++ gcc/testsuite/gcc.dg/loop-8.c	(working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O1 -fdump-rtl-loop2_invariant" } */
> -/* { dg-skip-if "unexpected IV" { "hppa*-*-* mips*-*-* visium-*-*" } { "*" } { "" } } */
> +/* { dg-skip-if "unexpected IV" { "hppa*-*-* mips*-*-* visium-*-* powerpc*-*-*" } { "*" } { "" } } */
> 
>  void
>  f (int *a, int *b)
> 
>
diff mbox

Patch

Index: gcc/testsuite/gcc.dg/loop-8.c
===================================================================
--- gcc/testsuite/gcc.dg/loop-8.c	(revision 244730)
+++ gcc/testsuite/gcc.dg/loop-8.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O1 -fdump-rtl-loop2_invariant" } */
-/* { dg-skip-if "unexpected IV" { "hppa*-*-* mips*-*-* visium-*-*" } { "*" } { "" } } */
+/* { dg-skip-if "unexpected IV" { "hppa*-*-* mips*-*-* visium-*-* powerpc*-*-*" } { "*" } { "" } } */
 
 void
 f (int *a, int *b)