[RS6000] Don't be too clever with dg-do run and dg-do compile

Otherwise some versions of dejagnu go ahead and run the vsx tests
below when they should not.  To best cope with older dejagnu, put
"run" before "compile", the idea being that if the second dg-do always
wins then that won't cause fails.

The altivec tests also need -save-temps for the scan-assembler test to
occur when vms_hw.

	* gcc.target/powerpc/vsx-load-element-extend-char.c: Put "dg-do run"
	before "dg-do compile", and make them mutually exclusive.
	* gcc.target/powerpc/vsx-load-element-extend-int.c: Likewise.
	* gcc.target/powerpc/vsx-load-element-extend-longlong.c: Likewise.
	* gcc.target/powerpc/vsx-load-element-extend-short.c: Likewise.
	* gcc.target/powerpc/vsx-store-element-truncate-char.c: Likewise.
	* gcc.target/powerpc/vsx-store-element-truncate-int.c: Likewise.
	* gcc.target/powerpc/vsx-store-element-truncate-longlong.c: Likewise.
	* gcc.target/powerpc/vsx-store-element-truncate-short.c: Likewise.
	* gcc.target/powerpc/altivec-consts.c: Likewise, add -save-temps.
	* gcc.target/powerpc/le-altivec-consts.c: Likewise.
This commit is contained in:
Alan Modra 2020-10-28 19:03:04 +10:30
parent bbb3625744
commit 4166ebedf8
10 changed files with 28 additions and 20 deletions

View File

@ -1,7 +1,7 @@
/* { dg-do run { target vmx_hw } } */
/* { dg-do compile } */
/* { dg-do compile { target { ! vmx_hw } } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -mabi=altivec -O2" } */
/* { dg-options "-maltivec -mabi=altivec -O2 -save-temps" } */
/* Check that "easy" AltiVec constants are correctly synthesized. */

View File

@ -1,7 +1,7 @@
/* { dg-do run { target vmx_hw } } */
/* { dg-do compile } */
/* { dg-do compile { target { ! vmx_hw } } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -mabi=altivec -O2" } */
/* { dg-options "-maltivec -mabi=altivec -O2 -save-temps" } */
/* Check that "easy" AltiVec constants are correctly synthesized. */

View File

@ -2,8 +2,9 @@
Test of vec_xl_sext and vec_xl_zext (load into rightmost
vector element and zero/sign extend). */
/* { dg-do compile {target power10_ok} } */
/* { dg-do run {target power10_hw} } */
/* { dg-do run { target power10_hw } } */
/* { dg-do compile { target { ! power10_hw } } } */
/* { dg-require-effective-target power10_ok } */
/* { dg-require-effective-target int128 } */
/* { dg-options "-mdejagnu-cpu=power10 -O3 -save-temps" } */

View File

@ -2,8 +2,9 @@
Test of vec_xl_sext and vec_xl_zext (load into rightmost
vector element and zero/sign extend). */
/* { dg-do compile {target power10_ok} } */
/* { dg-do run {target power10_hw} } */
/* { dg-do run { target power10_hw } } */
/* { dg-do compile { target { ! power10_hw } } } */
/* { dg-require-effective-target power10_ok } */
/* { dg-require-effective-target int128 } */
/* Deliberately set optization to zero for this test to confirm

View File

@ -2,8 +2,9 @@
Test of vec_xl_sext and vec_xl_zext (load into rightmost
vector element and zero/sign extend). */
/* { dg-do compile {target power10_ok} } */
/* { dg-do run {target power10_hw} } */
/* { dg-do run { target power10_hw } } */
/* { dg-do compile { target { ! power10_hw } } } */
/* { dg-require-effective-target power10_ok } */
/* { dg-require-effective-target int128 } */
/* { dg-options "-mdejagnu-cpu=power10 -O3 -save-temps" } */

View File

@ -2,8 +2,9 @@
Test of vec_xl_sext and vec_xl_zext (load into rightmost
vector element and zero/sign extend). */
/* { dg-do compile {target power10_ok} } */
/* { dg-do run {target power10_hw} } */
/* { dg-do run { target power10_hw } } */
/* { dg-do compile { target { ! power10_hw } } } */
/* { dg-require-effective-target power10_ok } */
/* { dg-require-effective-target int128 } */
/* Deliberately set optization to zero for this test to confirm

View File

@ -1,8 +1,9 @@
/*
Test of vec_xst_trunc (truncate and store rightmost vector element) */
/* { dg-do compile {target power10_ok} } */
/* { dg-do run {target power10_hw} } */
/* { dg-do run { target power10_hw } } */
/* { dg-do compile { target { ! power10_hw } } } */
/* { dg-require-effective-target power10_ok } */
/* { dg-require-effective-target int128 } */
/* Deliberately set optization to zero for this test to confirm
the stxvr*x instruction is generated. At higher optimization levels

View File

@ -1,8 +1,9 @@
/*
Test of vec_xst_trunc (truncate and store rightmost vector element) */
/* { dg-do compile {target power10_ok} } */
/* { dg-do run {target power10_hw} } */
/* { dg-do run { target power10_hw } } */
/* { dg-do compile { target { ! power10_hw } } } */
/* { dg-require-effective-target power10_ok } */
/* { dg-require-effective-target int128 } */
/* Deliberately set optization to zero for this test to confirm
the stxvr*x instruction is generated. At higher optimization levels

View File

@ -1,8 +1,9 @@
/*
Test of vec_xst_trunc (truncate and store rightmost vector element) */
/* { dg-do compile {target power10_ok} } */
/* { dg-do run {target power10_hw} } */
/* { dg-do run { target power10_hw } } */
/* { dg-do compile { target { ! power10_hw } } } */
/* { dg-require-effective-target power10_ok } */
/* { dg-require-effective-target int128 } */
/* Deliberately set optization to zero for this test to confirm

View File

@ -1,8 +1,9 @@
/*
Test of vec_xst_trunc (truncate and store rightmost vector element) */
/* { dg-do compile {target power10_ok} } */
/* { dg-do run {target power10_hw} } */
/* { dg-do run { target power10_hw } } */
/* { dg-do compile { target { ! power10_hw } } } */
/* { dg-require-effective-target power10_ok } */
/* { dg-require-effective-target int128 } */
/* Deliberately set optization to zero for this test to confirm