2014-10-30  Andrew Stubbs  <ams@codesourcery.com>

	gcc/testsuite/
	* gcc.target/powerpc/pr60102.c: Move dg-skip-if after dg-options.
	* gcc.target/powerpc/swaps-p8-12.c: Skip test if there would be
	conflicting -mcpu options.
	* gcc.target/powerpc/ppc-target-2.c: Likewise.
	* gcc.target/powerpc/cell_builtin-7.c: Likewise.
	* gcc.target/powerpc/dfp-builtin-1.c: Likewise.
	* gcc.target/powerpc/p8vector-builtin-1.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-7.c: Likewise.
	* gcc.target/powerpc/p8vector-vectorize-1.c: Likewise.
	* gcc.target/powerpc/pr48053-3.c: Likewise.
	* gcc.target/powerpc/vsx-builtin-6.c: Likewise.
	* gcc.target/powerpc/440-nmaclhw-1.c: Likewise.
	* gcc.target/powerpc/pr57744.c: Likewise.
	* gcc.target/powerpc/pr47862.c: Likewise.
	* gcc.target/powerpc/vsx-vectorize-8.c: Likewise.
	* gcc.target/powerpc/recip-1.c: Likewise.
	* gcc.target/powerpc/darwin-longlong.c: Likewise.
	* gcc.target/powerpc/bool2-p8.c: Likewise.
	* gcc.target/powerpc/mmfpgpr.c: Likewise.
	* gcc.target/powerpc/pr60203.c: Likewise.
	* gcc.target/powerpc/direct-move-vint1.c: Likewise.
	* gcc.target/powerpc/bool2-av.c: Likewise.
	* gcc.target/powerpc/pr43154.c: Likewise.
	* gcc.target/powerpc/ppc-fma-2.c: Likewise.
	* gcc.target/powerpc/swaps-p8-5.c: Likewise.
	* gcc.target/powerpc/pr59054.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-11.c: Likewise.
	* gcc.target/powerpc/440-mullhwu-1.c: Likewise.
	* gcc.target/powerpc/swaps-p8-13.c: Likewise.
	* gcc.target/powerpc/ppc-target-3.c: Likewise.
	* gcc.target/powerpc/cell_builtin-8.c: Likewise.
	* gcc.target/powerpc/dfp-builtin-2.c: Likewise.
	* gcc.target/powerpc/p8vector-builtin-2.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-8.c: Likewise.
	* gcc.target/powerpc/p8vector-vectorize-2.c: Likewise.
	* gcc.target/powerpc/p8vector-vbpermq.c: Likewise.
	* gcc.target/powerpc/vsx-vectorize-1.c: Likewise.
	* gcc.target/powerpc/bswap64-3.c: Likewise.
	* gcc.target/powerpc/bcd-1.c: Likewise.
	* gcc.target/powerpc/440-mulchwu-1.c: Likewise.
	* gcc.target/powerpc/extend-divide-1.c: Likewise.
	* gcc.target/powerpc/vsx-builtin-7.c: Likewise.
	* gcc.target/powerpc/pr48192.c: Likewise.
	* gcc.target/powerpc/pr52775.c: Likewise.
	* gcc.target/powerpc/p8vector-int128-1.c: Likewise.
	* gcc.target/powerpc/pr58673-1.c: Likewise.
	* gcc.target/powerpc/pr53487.c: Likewise.
	* gcc.target/powerpc/440-nmaclhw-2.c: Likewise.
	* gcc.target/powerpc/recip-2.c: Likewise.
	* gcc.target/powerpc/p8vector-fp.c: Likewise.
	* gcc.target/powerpc/direct-move-vint2.c: Likewise.
	* gcc.target/powerpc/ppc-fma-3.c: Likewise.
	* gcc.target/powerpc/pr57150.c: Likewise.
	* gcc.target/powerpc/pr47251.c: Likewise.
	* gcc.target/powerpc/swaps-p8-6.c: Likewise.
	* gcc.target/powerpc/440-mullhwu-2.c: Likewise.
	* gcc.target/powerpc/bool3-p7.c: Likewise.
	* gcc.target/powerpc/cell_builtin-1.c: Likewise.
	* gcc.target/powerpc/swaps-p8-14.c: Likewise.
	* gcc.target/powerpc/ppc-target-4.c: Likewise.
	* gcc.target/powerpc/440-mulhhw-1.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-1.c: Likewise.
	* gcc.target/powerpc/440-machhw-1.c: Likewise.
	* gcc.target/powerpc/p8vector-builtin-3.c: Likewise.
	* gcc.target/powerpc/vsx-mass-1.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-9.c: Likewise.
	* gcc.target/powerpc/p8vector-vectorize-3.c: Likewise.
	* gcc.target/powerpc/loop_align.c: Likewise.
	* gcc.target/powerpc/lhs-1.c: Likewise.
	* gcc.target/powerpc/sd-vsx.c: Likewise.
	* gcc.target/powerpc/vsx-vectorize-2.c: Likewise.
	* gcc.target/powerpc/bcd-2.c: Likewise.
	* gcc.target/powerpc/20040121-1.c: Likewise.
	* gcc.target/powerpc/pr52457.c: Likewise.
	* gcc.target/powerpc/440-mulchwu-2.c: Likewise.
	* gcc.target/powerpc/extend-divide-2.c: Likewise.
	* gcc.target/powerpc/vsx-builtin-8.c: Likewise.
	* gcc.target/powerpc/p8vector-int128-2.c: Likewise.
	* gcc.target/powerpc/pr58673-2.c: Likewise.
	* gcc.target/powerpc/atomic-p7.c: Likewise.
	* gcc.target/powerpc/recip-3.c: Likewise.
	* gcc.target/powerpc/440-maclhwu-1.c: Likewise.
	* gcc.target/powerpc/optimize-bswapsi-2.c: Likewise.
	* gcc.target/powerpc/popcount-1.c: Likewise.
	* gcc.target/powerpc/altivec-32.c: Likewise.
	* gcc.target/powerpc/timode_off.c: Likewise.
	* gcc.target/powerpc/p8vector-ldst.c: Likewise.
	* gcc.target/powerpc/pack01.c: Likewise.
	* gcc.target/powerpc/pr55033.c: Likewise.
	* gcc.target/powerpc/ppc-fma-4.c: Likewise.
	* gcc.target/powerpc/swaps-p8-7.c: Likewise.
	* gcc.target/powerpc/ppu-intrinsics.c: Likewise.
	* gcc.target/powerpc/440-macchwu-1.c: Likewise.
	* gcc.target/powerpc/440-mulhhwu-1.c: Likewise.
	* gcc.target/powerpc/440-mulchw-1.c: Likewise.
	* gcc.target/powerpc/bool3-p8.c: Likewise.
	* gcc.target/powerpc/cell_builtin-2.c: Likewise.
	* gcc.target/powerpc/swaps-p8-15.c: Likewise.
	* gcc.target/powerpc/440-macchw-1.c: Likewise.
	* gcc.target/powerpc/440-mulhhw-2.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-2.c: Likewise.
	* gcc.target/powerpc/440-machhw-2.c: Likewise.
	* gcc.target/powerpc/p8vector-builtin-4.c: Likewise.
	* gcc.target/powerpc/pr46728-16.c: Likewise.
	* gcc.target/powerpc/vsx-builtin-1.c: Likewise.
	* gcc.target/powerpc/bool3-av.c: Likewise.
	* gcc.target/powerpc/p8vector-vectorize-4.c: Likewise.
	* gcc.target/powerpc/ppc-pow.c: Likewise.
	* gcc.target/powerpc/lhs-2.c: Likewise.
	* gcc.target/powerpc/pr39902-2.c: Likewise.
	* gcc.target/powerpc/20041111-1.c: Likewise.
	* gcc.target/powerpc/builtins-1.c: Likewise.
	* gcc.target/powerpc/bcd-3.c: Likewise.
	* gcc.target/powerpc/vsx-vectorize-3.c: Likewise.
	* gcc.target/powerpc/pr57949-1.c: Likewise.
	* gcc.target/powerpc/atomic-p8.c: Likewise.
	* gcc.target/powerpc/sd-pwr6.c: Likewise.
	* gcc.target/powerpc/recip-4.c: Likewise.
	* gcc.target/powerpc/440-maclhwu-2.c: Likewise.
	* gcc.target/powerpc/warn-2.c: Likewise.
	* gcc.target/powerpc/parity-1.c: Likewise.
	* gcc.target/powerpc/popcount-2.c: Likewise.
	* gcc.target/powerpc/crypto-builtin-1.c: Likewise.
	* gcc.target/powerpc/ppc-fma-5.c: Likewise.
	* gcc.target/powerpc/swaps-p8-8.c: Likewise.
	* gcc.target/powerpc/pr42747.c: Likewise.
	* gcc.target/powerpc/440-macchwu-2.c: Likewise.
	* gcc.target/powerpc/440-mulhhwu-2.c: Likewise.
	* gcc.target/powerpc/dfp-dd-2.c: Likewise.
	* gcc.target/powerpc/direct-move-float1.c: Likewise.
	* gcc.target/powerpc/440-mulchw-2.c: Likewise.
	* gcc.target/powerpc/cell_builtin-3.c: Likewise.
	* gcc.target/powerpc/swaps-p8-16.c: Likewise.
	* gcc.target/powerpc/440-macchw-2.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-3.c: Likewise.
	* gcc.target/powerpc/dfp-td-2.c: Likewise.
	* gcc.target/powerpc/p8vector-builtin-5.c: Likewise.
	* gcc.target/powerpc/vsx-builtin-2.c: Likewise.
	* gcc.target/powerpc/p8vector-vectorize-5.c: Likewise.
	* gcc.target/powerpc/lhs-3.c: Likewise.
	* gcc.target/powerpc/440-nmachhw-1.c: Likewise.
	* gcc.target/powerpc/builtins-2.c: Likewise.
	* gcc.target/powerpc/vsx-vectorize-4.c: Likewise.
	* gcc.target/powerpc/pr52199.c: Likewise.
	* gcc.target/powerpc/440-machhwu-1.c: Likewise.
	* gcc.target/powerpc/pr57949-2.c: Likewise.
	* gcc.target/powerpc/recip-5.c: Likewise.
	* gcc.target/powerpc/popcount-3.c: Likewise.
	* gcc.target/powerpc/vsx-vector-1.c: Likewise.
	* gcc.target/powerpc/swaps-p8-1.c: Likewise.
	* gcc.target/powerpc/optimize-bswapdi-2.c: Likewise.
	* gcc.target/powerpc/ppc-fma-6.c: Likewise.
	* gcc.target/powerpc/vsx-extract-1.c: Likewise.
	* gcc.target/powerpc/pr48226.c: Likewise.
	* gcc.target/powerpc/swaps-p8-9.c: Likewise.
	* gcc.target/powerpc/pr47755-2.c: Likewise.
	* gcc.target/powerpc/direct-move-float2.c: Likewise.
	* gcc.target/powerpc/cell_builtin-4.c: Likewise.
	* gcc.target/powerpc/direct-move-double1.c: Likewise.
	* gcc.target/powerpc/swaps-p8-17.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-4.c: Likewise.
	* gcc.target/powerpc/dfp-td-3.c: Likewise.
	* gcc.target/powerpc/p8vector-builtin-6.c: Likewise.
	* gcc.target/powerpc/440-nmacchw-1.c: Likewise.
	* gcc.target/powerpc/vsx-builtin-3.c: Likewise.
	* gcc.target/powerpc/440-nmachhw-2.c: Likewise.
	* gcc.target/powerpc/vsx-vectorize-5.c: Likewise.
	* gcc.target/powerpc/bool2-p5.c: Likewise.
	* gcc.target/powerpc/440-machhwu-2.c: Likewise.
	* gcc.target/powerpc/fusion.c: Likewise.
	* gcc.target/powerpc/recip-6.c: Likewise.
	* gcc.target/powerpc/altivec-cell-6.c: Likewise.
	* gcc.target/powerpc/vsx-vector-2.c: Likewise.
	* gcc.target/powerpc/swaps-p8-2.c: Likewise.
	* gcc.target/powerpc/optimize-bswapdi-3.c: Likewise.
	* gcc.target/powerpc/ppc-fma-7.c: Likewise.
	* gcc.target/powerpc/vsx-extract-2.c: Likewise.
	* gcc.target/powerpc/direct-move-long1.c: Likewise.
	* gcc.target/powerpc/dfp-dd.c: Likewise.
	* gcc.target/powerpc/swaps-p8-10.c: Likewise.
	* gcc.target/powerpc/cell_builtin-5.c: Likewise.
	* gcc.target/powerpc/direct-move-double2.c: Likewise.
	* gcc.target/powerpc/440-mullhw-1.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-5.c: Likewise.
	* gcc.target/powerpc/440-maclhw-1.c: Likewise.
	* gcc.target/powerpc/dfp-td.c: Likewise.
	* gcc.target/powerpc/p8vector-builtin-7.c: Likewise.
	* gcc.target/powerpc/pr48053-1.c: Likewise.
	* gcc.target/powerpc/440-nmacchw-2.c: Likewise.
	* gcc.target/powerpc/vsx-builtin-4.c: Likewise.
	* gcc.target/powerpc/pr60676.c: Likewise.
	* gcc.target/powerpc/pr48258-1.c: Likewise.
	* gcc.target/powerpc/vsx-vectorize-6.c: Likewise.
	* gcc.target/powerpc/pr48857.c: Likewise.
	* gcc.target/powerpc/quad-atomic.c: Likewise.
	* gcc.target/powerpc/altivec-cell-7.c: Likewise.
	* gcc.target/powerpc/atomic_load_store-p8.c: Likewise.
	* gcc.target/powerpc/vsx-vector-3.c: Likewise.
	* gcc.target/powerpc/swaps-p8-3.c: Likewise.
	* gcc.target/powerpc/pr56605.c: Likewise.
	* gcc.target/powerpc/vsx-extract-3.c: Likewise.
	* gcc.target/powerpc/pr53199.c: Likewise.
	* gcc.target/powerpc/direct-move-long2.c: Likewise.
	* gcc.target/powerpc/swaps-p8-11.c: Likewise.
	* gcc.target/powerpc/vsx-float0.c: Likewise.
	* gcc.target/powerpc/ppc-target-1.c: Likewise.
	* gcc.target/powerpc/altivec-20.c: Likewise.
	* gcc.target/powerpc/cell_builtin-6.c: Likewise.
	* gcc.target/powerpc/440-mullhw-2.c: Likewise.
	* gcc.target/powerpc/darwin-ehreturn-1.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-6.c: Likewise.
	* gcc.target/powerpc/440-maclhw-2.c: Likewise.
	* gcc.target/powerpc/440-dlmzb-strlen-1.c: Likewise.
	* gcc.target/powerpc/pr60137.c: Likewise.
	* gcc.target/powerpc/bswap64-1.c: Likewise.
	* gcc.target/powerpc/pr48053-2.c: Likewise.
	* gcc.target/powerpc/vsx-builtin-5.c: Likewise.
	* gcc.target/powerpc/pr48258-2.c: Likewise.
	* gcc.target/powerpc/vsx-vectorize-7.c: Likewise.
	* gcc.target/powerpc/vsx-sfminmax.c: Likewise.
	* gcc.target/powerpc/bool2-p7.c: Likewise.
	* gcc.target/powerpc/ppc-round.c: Likewise.
	* gcc.target/powerpc/altivec-cell-8.c: Likewise.
	* gcc.target/powerpc/vsx-vector-4.c: Likewise.
	* gcc.target/powerpc/ppc-fma-1.c: Likewise.
	* gcc.target/powerpc/swaps-p8-4.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-10.c: Likewise.
	* gcc.target/powerpc/pr47755.c: Likewise.

Index: gcc.target/powerpc/swaps-p8-12.c
===================================================================
--- gcc.target/powerpc/swaps-p8-12.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-12.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 /* { dg-final { scan-assembler "lxvd2x" } } */
 /* { dg-final { scan-assembler "stxvd2x" } } */
Index: gcc.target/powerpc/ppc-target-2.c
===================================================================
--- gcc.target/powerpc/ppc-target-2.c	(revision 216846)
+++ gcc.target/powerpc/ppc-target-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -ffast-math -mcpu=power5 -mabi=altivec" } */
 /* { dg-final { scan-assembler-times "fabs" 3 } } */
 /* { dg-final { scan-assembler-times "fnabs" 3 } } */
Index: gcc.target/powerpc/cell_builtin-7.c
===================================================================
--- gcc.target/powerpc/cell_builtin-7.c	(revision 216846)
+++ gcc.target/powerpc/cell_builtin-7.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-O2 -maltivec -mcpu=cell" } */
 /* { dg-final { scan-assembler-times "stvrx" 19 } } */
 
Index: gcc.target/powerpc/dfp-builtin-1.c
===================================================================
--- gcc.target/powerpc/dfp-builtin-1.c	(revision 216846)
+++ gcc.target/powerpc/dfp-builtin-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2" } */
 /* { dg-final { scan-assembler-times "ddedpd " 4    } } */
 /* { dg-final { scan-assembler-times "denbcd " 2    } } */
Index: gcc.target/powerpc/p8vector-builtin-1.c
===================================================================
--- gcc.target/powerpc/p8vector-builtin-1.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-builtin-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
 
 #ifndef TYPE
Index: gcc.target/powerpc/ppc-fpconv-7.c
===================================================================
--- gcc.target/powerpc/ppc-fpconv-7.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fpconv-7.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-require-effective-target powerpc_fprs } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O3 -mcpu=power5 -ffast-math" } */
 /* { dg-final { scan-assembler-times "fctiwz" 2 } } */
 /* { dg-final { scan-assembler-not "fctiwuz" } } */
Index: gcc.target/powerpc/p8vector-vectorize-1.c
===================================================================
--- gcc.target/powerpc/p8vector-vectorize-1.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-vectorize-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
 
 #ifndef SIZE
Index: gcc.target/powerpc/pr48053-3.c
===================================================================
--- gcc.target/powerpc/pr48053-3.c	(revision 216846)
+++ gcc.target/powerpc/pr48053-3.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7" } */
 
 /* Cut down example from s_scalbnl that aborted on 32-bit when the fix for
Index: gcc.target/powerpc/vsx-builtin-6.c
===================================================================
--- gcc.target/powerpc/vsx-builtin-6.c	(revision 216846)
+++ gcc.target/powerpc/vsx-builtin-6.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 
 /* Check whether tdiv and tsqrt instructions generate the correct code.  */
Index: gcc.target/powerpc/440-nmaclhw-1.c
===================================================================
--- gcc.target/powerpc/440-nmaclhw-1.c	(revision 216846)
+++ gcc.target/powerpc/440-nmaclhw-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "nmaclhw " } } */
Index: gcc.target/powerpc/pr57744.c
===================================================================
--- gcc.target/powerpc/pr57744.c	(revision 216846)
+++ gcc.target/powerpc/pr57744.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do run { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 
 void abort (void);
Index: gcc.target/powerpc/pr47862.c
===================================================================
--- gcc.target/powerpc/pr47862.c	(revision 216846)
+++ gcc.target/powerpc/pr47862.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler-not "stfd" } } */
 
Index: gcc.target/powerpc/vsx-vectorize-8.c
===================================================================
--- gcc.target/powerpc/vsx-vectorize-8.c	(revision 216846)
+++ gcc.target/powerpc/vsx-vectorize-8.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
 
 /* Taken from vect/vect-95.c.  */
Index: gcc.target/powerpc/recip-1.c
===================================================================
--- gcc.target/powerpc/recip-1.c	(revision 216846)
+++ gcc.target/powerpc/recip-1.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */
 /* { dg-require-effective-target powerpc_fprs } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O2 -mrecip -ffast-math -mcpu=power6" } */
 /* { dg-final { scan-assembler-times "frsqrte" 2 } } */
 /* { dg-final { scan-assembler-times "fmsub" 2 } } */
Index: gcc.target/powerpc/darwin-longlong.c
===================================================================
--- gcc.target/powerpc/darwin-longlong.c	(revision 216846)
+++ gcc.target/powerpc/darwin-longlong.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do run { target powerpc*-*-* } } */
 /* { dg-require-effective-target powerpc64 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=G5" } } */
 /* { dg-options "-mcpu=G5" } */
 
 #include <stdlib.h>
Index: gcc.target/powerpc/bool2-p8.c
===================================================================
--- gcc.target/powerpc/bool2-p8.c	(revision 216846)
+++ gcc.target/powerpc/bool2-p8.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-O2 -mcpu=power8" } */
 /* { dg-final { scan-assembler-not "\[ \t\]and "     } } */
 /* { dg-final { scan-assembler-not "\[ \t\]or "      } } */
Index: gcc.target/powerpc/mmfpgpr.c
===================================================================
--- gcc.target/powerpc/mmfpgpr.c	(revision 216846)
+++ gcc.target/powerpc/mmfpgpr.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6x" } } */
 /* { dg-options "-O2 -mcpu=power6x -mmfpgpr" } */
 /* { dg-final { scan-assembler "mffgpr" } } */
 /* { dg-final { scan-assembler "mftgpr" } } */
Index: gcc.target/powerpc/pr60203.c
===================================================================
--- gcc.target/powerpc/pr60203.c	(revision 216846)
+++ gcc.target/powerpc/pr60203.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 
 union u_ld { long double ld; double d[2]; };
Index: gcc.target/powerpc/direct-move-vint1.c
===================================================================
--- gcc.target/powerpc/direct-move-vint1.c	(revision 216846)
+++ gcc.target/powerpc/direct-move-vint1.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 /* { dg-final { scan-assembler "mtvsrd" } } */
 /* { dg-final { scan-assembler "mfvsrd" } } */
Index: gcc.target/powerpc/bool2-av.c
===================================================================
--- gcc.target/powerpc/bool2-av.c	(revision 216846)
+++ gcc.target/powerpc/bool2-av.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O2 -mcpu=power6 -maltivec" } */
 /* { dg-final { scan-assembler-not "\[ \t\]and "     } } */
 /* { dg-final { scan-assembler-not "\[ \t\]or "      } } */
Index: gcc.target/powerpc/pr43154.c
===================================================================
--- gcc.target/powerpc/pr43154.c	(revision 216846)
+++ gcc.target/powerpc/pr43154.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*le-*-* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 
 /* Make sure that vec_mergel and vec_mergeh are supported for V2DF/V2DI types.  */
Index: gcc.target/powerpc/ppc-fma-2.c
===================================================================
--- gcc.target/powerpc/ppc-fma-2.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fma-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -ftree-vectorize -mcpu=power7 -ffast-math -ffp-contract=off" } */
 /* { dg-final { scan-assembler-times "xvmadd" 2 } } */
 /* { dg-final { scan-assembler-times "xsmadd\|fmadd\ " 1 } } */
Index: gcc.target/powerpc/swaps-p8-5.c
===================================================================
--- gcc.target/powerpc/swaps-p8-5.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-5.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 /* { dg-final { scan-assembler "lxvd2x" } } */
 /* { dg-final { scan-assembler "stxvd2x" } } */
Index: gcc.target/powerpc/pr59054.c
===================================================================
--- gcc.target/powerpc/pr59054.c	(revision 216846)
+++ gcc.target/powerpc/pr59054.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O0 -m64" } */
 
 long foo (void) { return 0; }
Index: gcc.target/powerpc/ppc-fpconv-11.c
===================================================================
--- gcc.target/powerpc/ppc-fpconv-11.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fpconv-11.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_fprs } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5+" } } */
 /* { dg-options "-O2 -mcpu=power5+ -ffast-math" } */
 /* { dg-final { scan-assembler-not "xsrdpiz" } } */
 /* { dg-final { scan-assembler "friz" } } */
Index: gcc.target/powerpc/440-mullhwu-1.c
===================================================================
--- gcc.target/powerpc/440-mullhwu-1.c	(revision 216846)
+++ gcc.target/powerpc/440-mullhwu-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "mullhwu " } } */
Index: gcc.target/powerpc/swaps-p8-13.c
===================================================================
--- gcc.target/powerpc/swaps-p8-13.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-13.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 
 #include <altivec.h>
Index: gcc.target/powerpc/ppc-target-3.c
===================================================================
--- gcc.target/powerpc/ppc-target-3.c	(revision 216846)
+++ gcc.target/powerpc/ppc-target-3.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -ffast-math -mcpu=power5 -mabi=no-altivec" } */
 /* { dg-final { scan-assembler-times "fabs" 3 } } */
 /* { dg-final { scan-assembler-times "fnabs" 3 } } */
Index: gcc.target/powerpc/cell_builtin-8.c
===================================================================
--- gcc.target/powerpc/cell_builtin-8.c	(revision 216846)
+++ gcc.target/powerpc/cell_builtin-8.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-O2 -maltivec -mcpu=cell" } */
 /* { dg-final { scan-assembler-times "stvrxl" 19 } } */
 
Index: gcc.target/powerpc/dfp-builtin-2.c
===================================================================
--- gcc.target/powerpc/dfp-builtin-2.c	(revision 216846)
+++ gcc.target/powerpc/dfp-builtin-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2" } */
 /* { dg-final { scan-assembler-times "ddedpdq " 4    } } */
 /* { dg-final { scan-assembler-times "denbcdq " 2    } } */
Index: gcc.target/powerpc/p8vector-builtin-2.c
===================================================================
--- gcc.target/powerpc/p8vector-builtin-2.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-builtin-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
 
 #include <altivec.h>
Index: gcc.target/powerpc/ppc-fpconv-8.c
===================================================================
--- gcc.target/powerpc/ppc-fpconv-8.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fpconv-8.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-require-effective-target powerpc_fprs } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=750" } } */
 /* { dg-options "-O3 -mcpu=750 -ffast-math" } */
 /* { dg-final { scan-assembler-times "fctiwz" 6 } } */
 /* { dg-final { scan-assembler-not "fctiwuz" } } */
Index: gcc.target/powerpc/p8vector-vectorize-2.c
===================================================================
--- gcc.target/powerpc/p8vector-vectorize-2.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-vectorize-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic" } */
 
 #include <stddef.h>
Index: gcc.target/powerpc/p8vector-vbpermq.c
===================================================================
--- gcc.target/powerpc/p8vector-vbpermq.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-vbpermq.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-O3 -mcpu=power8" } */
 /* { dg-final { scan-assembler     "vbpermq" } } */
 /* { dg-final { scan-assembler     "mfvsrd"  } } */
Index: gcc.target/powerpc/vsx-vectorize-1.c
===================================================================
--- gcc.target/powerpc/vsx-vectorize-1.c	(revision 216846)
+++ gcc.target/powerpc/vsx-vectorize-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
 
 /* Taken from vect/vect-align-1.c.  */
Index: gcc.target/powerpc/bswap64-3.c
===================================================================
--- gcc.target/powerpc/bswap64-3.c	(revision 216846)
+++ gcc.target/powerpc/bswap64-3.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-O2 -mcpu=cell" } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_ppu_ok } */
Index: gcc.target/powerpc/bcd-1.c
===================================================================
--- gcc.target/powerpc/bcd-1.c	(revision 216846)
+++ gcc.target/powerpc/bcd-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2" } */
 /* { dg-final { scan-assembler-times "cdtbcd " 1 } } */
 /* { dg-final { scan-assembler-times "cbcdtd " 1 } } */
Index: gcc.target/powerpc/440-mulchwu-1.c
===================================================================
--- gcc.target/powerpc/440-mulchwu-1.c	(revision 216846)
+++ gcc.target/powerpc/440-mulchwu-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "mulchwu " } } */
Index: gcc.target/powerpc/extend-divide-1.c
===================================================================
--- gcc.target/powerpc/extend-divide-1.c	(revision 216846)
+++ gcc.target/powerpc/extend-divide-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2" } */
 /* { dg-final { scan-assembler-times "divwe "   1 } } */
 /* { dg-final { scan-assembler-times "divweo "  1 } } */
Index: gcc.target/powerpc/vsx-builtin-7.c
===================================================================
--- gcc.target/powerpc/vsx-builtin-7.c	(revision 216846)
+++ gcc.target/powerpc/vsx-builtin-7.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 
 /* Test simple extract/insert/slat operations.  Make sure all types are
Index: gcc.target/powerpc/pr48192.c
===================================================================
--- gcc.target/powerpc/pr48192.c	(revision 216846)
+++ gcc.target/powerpc/pr48192.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7 -std=gnu89" } */
 
 /* Make sure that the conditional macros vector, bool, and pixel are not
Index: gcc.target/powerpc/pr52775.c
===================================================================
--- gcc.target/powerpc/pr52775.c	(revision 216846)
+++ gcc.target/powerpc/pr52775.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power4" } } */
 /* { dg-options "-O1 -mcpu=power4" } */
 /* { dg-final { scan-assembler-times "fcfid" 2 } } */
 
Index: gcc.target/powerpc/p8vector-int128-1.c
===================================================================
--- gcc.target/powerpc/p8vector-int128-1.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-int128-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3 -mvsx-timode" } */
 
 #include <altivec.h>
Index: gcc.target/powerpc/pr58673-1.c
===================================================================
--- gcc.target/powerpc/pr58673-1.c	(revision 216846)
+++ gcc.target/powerpc/pr58673-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -m64 -O1" } */
 
 enum typecode
Index: gcc.target/powerpc/pr53487.c
===================================================================
--- gcc.target/powerpc/pr53487.c	(revision 216846)
+++ gcc.target/powerpc/pr53487.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7 -misel -ffast-math" } */
 
 struct phylo_s {
Index: gcc.target/powerpc/440-nmaclhw-2.c
===================================================================
--- gcc.target/powerpc/440-nmaclhw-2.c	(revision 216846)
+++ gcc.target/powerpc/440-nmaclhw-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "nmaclhw\\. " } } */
Index: gcc.target/powerpc/recip-2.c
===================================================================
--- gcc.target/powerpc/recip-2.c	(revision 216846)
+++ gcc.target/powerpc/recip-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */
 /* { dg-require-effective-target powerpc_fprs } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -mrecip -ffast-math -mcpu=power5" } */
 /* { dg-final { scan-assembler-times "frsqrtes" 1 } } */
 /* { dg-final { scan-assembler-times "fmsubs" 1 } } */
Index: gcc.target/powerpc/p8vector-fp.c
===================================================================
--- gcc.target/powerpc/p8vector-fp.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-fp.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2 -mupper-regs-df -mupper-regs-sf -fno-math-errno" } */
 
 float abs_sf (float *p)
Index: gcc.target/powerpc/direct-move-vint2.c
===================================================================
--- gcc.target/powerpc/direct-move-vint2.c	(revision 216846)
+++ gcc.target/powerpc/direct-move-vint2.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target p8vector_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 
 /* Check whether we get the right bits for direct move at runtime.  */
Index: gcc.target/powerpc/ppc-fma-3.c
===================================================================
--- gcc.target/powerpc/ppc-fma-3.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fma-3.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
 /* { dg-require-effective-target powerpc_fprs } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O3 -ftree-vectorize -mcpu=power6 -maltivec -ffast-math" } */
 /* { dg-final { scan-assembler-times "vmaddfp" 2 } } */
 /* { dg-final { scan-assembler-times "fmadd " 2 } } */
Index: gcc.target/powerpc/pr57150.c
===================================================================
--- gcc.target/powerpc/pr57150.c	(revision 216846)
+++ gcc.target/powerpc/pr57150.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7 -fcaller-saves" } */
 /* { dg-final { scan-assembler-not "lxvd2x" } } */
 /* { dg-final { scan-assembler-not "lxvw4x" } } */
Index: gcc.target/powerpc/pr47251.c
===================================================================
--- gcc.target/powerpc/pr47251.c	(revision 216846)
+++ gcc.target/powerpc/pr47251.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -msoft-float -mcpu=power7" } */
 
 /* PR 47151: libgcc fails to build when using --with-cpu=power7 due to a missed
Index: gcc.target/powerpc/swaps-p8-6.c
===================================================================
--- gcc.target/powerpc/swaps-p8-6.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-6.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 
 void abort();
Index: gcc.target/powerpc/440-mullhwu-2.c
===================================================================
--- gcc.target/powerpc/440-mullhwu-2.c	(revision 216846)
+++ gcc.target/powerpc/440-mullhwu-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "mullhwu\\. " } } */
Index: gcc.target/powerpc/bool3-p7.c
===================================================================
--- gcc.target/powerpc/bool3-p7.c	(revision 216846)
+++ gcc.target/powerpc/bool3-p7.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler	   "\[ \t\]and "     } } */
 /* { dg-final { scan-assembler	   "\[ \t\]or "      } } */
Index: gcc.target/powerpc/cell_builtin-1.c
===================================================================
--- gcc.target/powerpc/cell_builtin-1.c	(revision 216846)
+++ gcc.target/powerpc/cell_builtin-1.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
-/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-O2 -maltivec -mcpu=cell" } */
 /* { dg-final { scan-assembler-times "lvlx" 19 } } */
 
Index: gcc.target/powerpc/swaps-p8-14.c
===================================================================
--- gcc.target/powerpc/swaps-p8-14.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-14.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 /* { dg-final { scan-assembler "lxvd2x" } } */
 /* { dg-final { scan-assembler "stxvd2x" } } */
Index: gcc.target/powerpc/ppc-target-4.c
===================================================================
--- gcc.target/powerpc/ppc-target-4.c	(revision 216846)
+++ gcc.target/powerpc/ppc-target-4.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -ffast-math -mcpu=power5 -mno-altivec -mabi=altivec -fno-unroll-loops" } */
 /* { dg-final { scan-assembler-times "vaddfp" 1 } } */
 /* { dg-final { scan-assembler-times "xvaddsp" 1 } } */
Index: gcc.target/powerpc/440-mulhhw-1.c
===================================================================
--- gcc.target/powerpc/440-mulhhw-1.c	(revision 216846)
+++ gcc.target/powerpc/440-mulhhw-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "mulhhw " } } */
Index: gcc.target/powerpc/ppc-fpconv-1.c
===================================================================
--- gcc.target/powerpc/ppc-fpconv-1.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fpconv-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7 -ffast-math" } */
 /* { dg-final { scan-assembler-times "lfiwax" 2 } } */
 /* { dg-final { scan-assembler-times "lfiwzx" 2 } } */
Index: gcc.target/powerpc/440-machhw-1.c
===================================================================
--- gcc.target/powerpc/440-machhw-1.c	(revision 216846)
+++ gcc.target/powerpc/440-machhw-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "machhw " } } */
Index: gcc.target/powerpc/p8vector-builtin-3.c
===================================================================
--- gcc.target/powerpc/p8vector-builtin-3.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-builtin-3.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3 -ftree-vectorize -fvect-cost-model=dynamic" } */
 
 #include <altivec.h>
Index: gcc.target/powerpc/vsx-mass-1.c
===================================================================
--- gcc.target/powerpc/vsx-mass-1.c	(revision 216846)
+++ gcc.target/powerpc/vsx-mass-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-linux* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -ftree-vectorize -mcpu=power7 -ffast-math -mveclibabi=mass" } */
 /* { dg-final { scan-assembler "bl\[\\. \]+atan2d2" } } */
 /* { dg-final { scan-assembler "bl\[\\. \]+atan2f4" } } */
Index: gcc.target/powerpc/ppc-fpconv-9.c
===================================================================
--- gcc.target/powerpc/ppc-fpconv-9.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fpconv-9.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7 -ffast-math" } */
 /* { dg-final { scan-assembler-not "lwz" } } */
 /* { dg-final { scan-assembler-not "stw" } } */
Index: gcc.target/powerpc/p8vector-vectorize-3.c
===================================================================
--- gcc.target/powerpc/p8vector-vectorize-3.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-vectorize-3.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic" } */
 
 #include <stddef.h>
Index: gcc.target/powerpc/loop_align.c
===================================================================
--- gcc.target/powerpc/loop_align.c	(revision 216846)
+++ gcc.target/powerpc/loop_align.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* powerpc-ibm-aix* } { "*" } { "" } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7 -falign-functions=16" } */
 /* { dg-final { scan-assembler ".p2align 5,,31" } } */
 
Index: gcc.target/powerpc/lhs-1.c
===================================================================
--- gcc.target/powerpc/lhs-1.c	(revision 216846)
+++ gcc.target/powerpc/lhs-1.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -mcpu=power5" } */
 /* { dg-final { scan-assembler-times "nop" 3 } } */
 
Index: gcc.target/powerpc/sd-vsx.c
===================================================================
--- gcc.target/powerpc/sd-vsx.c	(revision 216846)
+++ gcc.target/powerpc/sd-vsx.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* powerpc-ibm-aix* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
 /* { dg-require-effective-target dfp } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7 -mhard-dfp" } */
 /* { dg-final { scan-assembler-times "lfiwzx" 2 } } */
 /* { dg-final { scan-assembler-times "stfiwx" 1 } } */
Index: gcc.target/powerpc/vsx-vectorize-2.c
===================================================================
--- gcc.target/powerpc/vsx-vectorize-2.c	(revision 216846)
+++ gcc.target/powerpc/vsx-vectorize-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
 
 /* Taken from vect/vect-95.c.  */
Index: gcc.target/powerpc/bcd-2.c
===================================================================
--- gcc.target/powerpc/bcd-2.c	(revision 216846)
+++ gcc.target/powerpc/bcd-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 /* { dg-final { scan-assembler-times "bcdadd\[.\] " 2 } } */
 /* { dg-final { scan-assembler-times "bcdsub\[.\] " 2 } } */
Index: gcc.target/powerpc/20040121-1.c
===================================================================
--- gcc.target/powerpc/20040121-1.c	(revision 216846)
+++ gcc.target/powerpc/20040121-1.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=G5" } } */
 /* { dg-options "-O2 -mcpu=G5 " } */
 
 long long (*y)(int t);
Index: gcc.target/powerpc/pr52457.c
===================================================================
--- gcc.target/powerpc/pr52457.c	(revision 216846)
+++ gcc.target/powerpc/pr52457.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target vsx_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O1 -mcpu=power7" } */
 
 extern void abort (void);
Index: gcc.target/powerpc/440-mulchwu-2.c
===================================================================
--- gcc.target/powerpc/440-mulchwu-2.c	(revision 216846)
+++ gcc.target/powerpc/440-mulchwu-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "mulchwu\\. " } } */
Index: gcc.target/powerpc/extend-divide-2.c
===================================================================
--- gcc.target/powerpc/extend-divide-2.c	(revision 216846)
+++ gcc.target/powerpc/extend-divide-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2" } */
 /* { dg-final { scan-assembler-times "divde "   1 } } */
 /* { dg-final { scan-assembler-times "divdeo "  1 } } */
Index: gcc.target/powerpc/vsx-builtin-8.c
===================================================================
--- gcc.target/powerpc/vsx-builtin-8.c	(revision 216846)
+++ gcc.target/powerpc/vsx-builtin-8.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
 
 /* Test the various load/store varients.  */
Index: gcc.target/powerpc/p8vector-int128-2.c
===================================================================
--- gcc.target/powerpc/p8vector-int128-2.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-int128-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target p8vector_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 
 #include <stddef.h>
Index: gcc.target/powerpc/pr58673-2.c
===================================================================
--- gcc.target/powerpc/pr58673-2.c	(revision 216846)
+++ gcc.target/powerpc/pr58673-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3 -m64 -funroll-loops" } */
 
 #include <stddef.h>
Index: gcc.target/powerpc/atomic-p7.c
===================================================================
--- gcc.target/powerpc/atomic-p7.c	(revision 216846)
+++ gcc.target/powerpc/atomic-p7.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2" } */
 /* { dg-final { scan-assembler-not "lbarx" } } */
 /* { dg-final { scan-assembler-not "lharx" } } */
Index: gcc.target/powerpc/recip-3.c
===================================================================
--- gcc.target/powerpc/recip-3.c	(revision 216846)
+++ gcc.target/powerpc/recip-3.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */
 /* { dg-require-effective-target powerpc_fprs } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mrecip -ffast-math -mcpu=power7" } */
 /* { dg-final { scan-assembler-times "xsrsqrtedp\|frsqrte\ " 1 } } */
 /* { dg-final { scan-assembler-times "xsmsub.dp\|fmsub\ " 1 } } */
Index: gcc.target/powerpc/440-maclhwu-1.c
===================================================================
--- gcc.target/powerpc/440-maclhwu-1.c	(revision 216846)
+++ gcc.target/powerpc/440-maclhwu-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "maclhwu " } } */
Index: gcc.target/powerpc/optimize-bswapsi-2.c
===================================================================
--- gcc.target/powerpc/optimize-bswapsi-2.c	(revision 216846)
+++ gcc.target/powerpc/optimize-bswapsi-2.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target stdint_types } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -mcpu=power5" } */
 
 #include <stdint.h>
Index: gcc.target/powerpc/popcount-1.c
===================================================================
--- gcc.target/powerpc/popcount-1.c	(revision 216846)
+++ gcc.target/powerpc/popcount-1.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { ilp32 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -mcpu=power5" } */
 /* { dg-final { scan-assembler "popcntb" } } */
 /* { dg-final { scan-assembler-not "mullw" } } */
Index: gcc.target/powerpc/altivec-32.c
===================================================================
--- gcc.target/powerpc/altivec-32.c	(revision 216846)
+++ gcc.target/powerpc/altivec-32.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O2 -ftree-vectorize -mcpu=power6 -maltivec" } */
 /* { dg-final { scan-assembler "vsel" } } */
 /* { dg-final { scan-assembler "vrfim" } } */
Index: gcc.target/powerpc/timode_off.c
===================================================================
--- gcc.target/powerpc/timode_off.c	(revision 216846)
+++ gcc.target/powerpc/timode_off.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do assemble { target { lp64 } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps -mcpu=power5" } */
 
 typedef int TImode __attribute__ ((mode (TI)));
Index: gcc.target/powerpc/p8vector-ldst.c
===================================================================
--- gcc.target/powerpc/p8vector-ldst.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-ldst.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2 -mupper-regs-df -mupper-regs-sf" } */
 
 float load_sf (float *p)
Index: gcc.target/powerpc/pack01.c
===================================================================
--- gcc.target/powerpc/pack01.c	(revision 216846)
+++ gcc.target/powerpc/pack01.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target p8vector_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 
 #include <stddef.h>
Index: gcc.target/powerpc/pr55033.c
===================================================================
--- gcc.target/powerpc/pr55033.c	(revision 216846)
+++ gcc.target/powerpc/pr55033.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target powerpc_eabi_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=8540" } } */
 /* { dg-options "-mcpu=8540 -msoft-float -meabi -msdata=eabi -G 8 -fno-common" } */
 
 extern void f (void);
Index: gcc.target/powerpc/ppc-fma-4.c
===================================================================
--- gcc.target/powerpc/ppc-fma-4.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fma-4.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
 /* { dg-require-effective-target powerpc_fprs } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O3 -ftree-vectorize -mcpu=power6 -maltivec -ffast-math -ffp-contract=off" } */
 /* { dg-final { scan-assembler-times "vmaddfp" 1 } } */
 /* { dg-final { scan-assembler-times "fmadd " 1 } } */
Index: gcc.target/powerpc/swaps-p8-7.c
===================================================================
--- gcc.target/powerpc/swaps-p8-7.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-7.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 
 void abort ();
Index: gcc.target/powerpc/ppu-intrinsics.c
===================================================================
--- gcc.target/powerpc/ppu-intrinsics.c	(revision 216846)
+++ gcc.target/powerpc/ppu-intrinsics.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do link { target { *-*-linux* && powerpc_fprs } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-W -Wall -Wno-uninitialized -Wno-unused-but-set-variable -mcpu=cell" } */
 /* Test some PPU intrinsics from <ppu_intrinsics.h>.  */
 
Index: gcc.target/powerpc/440-macchwu-1.c
===================================================================
--- gcc.target/powerpc/440-macchwu-1.c	(revision 216846)
+++ gcc.target/powerpc/440-macchwu-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "macchwu " } } */
Index: gcc.target/powerpc/440-mulhhwu-1.c
===================================================================
--- gcc.target/powerpc/440-mulhhwu-1.c	(revision 216846)
+++ gcc.target/powerpc/440-mulhhwu-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "mulhhwu " } } */
Index: gcc.target/powerpc/440-mulchw-1.c
===================================================================
--- gcc.target/powerpc/440-mulchw-1.c	(revision 216846)
+++ gcc.target/powerpc/440-mulchw-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "mulchw " } } */
Index: gcc.target/powerpc/bool3-p8.c
===================================================================
--- gcc.target/powerpc/bool3-p8.c	(revision 216846)
+++ gcc.target/powerpc/bool3-p8.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-O2 -mcpu=power8" } */
 /* { dg-final { scan-assembler	   "\[ \t\]and "     } } */
 /* { dg-final { scan-assembler	   "\[ \t\]or "      } } */
Index: gcc.target/powerpc/cell_builtin-2.c
===================================================================
--- gcc.target/powerpc/cell_builtin-2.c	(revision 216846)
+++ gcc.target/powerpc/cell_builtin-2.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
-/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-O2 -maltivec -mcpu=cell" } */
 /* { dg-final { scan-assembler-times "lvlxl" 19 } } */
 
Index: gcc.target/powerpc/swaps-p8-15.c
===================================================================
--- gcc.target/powerpc/swaps-p8-15.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-15.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 /* { dg-final { scan-assembler "lxvd2x" } } */
 /* { dg-final { scan-assembler "stxvd2x" } } */
Index: gcc.target/powerpc/440-macchw-1.c
===================================================================
--- gcc.target/powerpc/440-macchw-1.c	(revision 216846)
+++ gcc.target/powerpc/440-macchw-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "macchw " } } */
Index: gcc.target/powerpc/440-mulhhw-2.c
===================================================================
--- gcc.target/powerpc/440-mulhhw-2.c	(revision 216846)
+++ gcc.target/powerpc/440-mulhhw-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "mulhhw\\. " } } */
Index: gcc.target/powerpc/ppc-fpconv-2.c
===================================================================
--- gcc.target/powerpc/ppc-fpconv-2.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fpconv-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O2 -mcpu=power6 -ffast-math" } */
 /* { dg-final { scan-assembler-times "lfiwax" 2 } } */
 /* { dg-final { scan-assembler-not "lfiwzx" } } */
Index: gcc.target/powerpc/440-machhw-2.c
===================================================================
--- gcc.target/powerpc/440-machhw-2.c	(revision 216846)
+++ gcc.target/powerpc/440-machhw-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "machhw\\. " } } */
Index: gcc.target/powerpc/p8vector-builtin-4.c
===================================================================
--- gcc.target/powerpc/p8vector-builtin-4.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-builtin-4.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3 -ftree-vectorize -fvect-cost-model=dynamic" } */
 
 #include <altivec.h>
Index: gcc.target/powerpc/pr46728-16.c
===================================================================
--- gcc.target/powerpc/pr46728-16.c	(revision 216846)
+++ gcc.target/powerpc/pr46728-16.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O2 -ffast-math -mcpu=power6" } */
 
 double foo (double x, double y)
Index: gcc.target/powerpc/vsx-builtin-1.c
===================================================================
--- gcc.target/powerpc/vsx-builtin-1.c	(revision 216846)
+++ gcc.target/powerpc/vsx-builtin-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler "xvadddp" } } */
 /* { dg-final { scan-assembler "xvsubdp" } } */
Index: gcc.target/powerpc/bool3-av.c
===================================================================
--- gcc.target/powerpc/bool3-av.c	(revision 216846)
+++ gcc.target/powerpc/bool3-av.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O2 -mcpu=power6 -mabi=altivec -maltivec -mno-vsx" } */
 /* { dg-final { scan-assembler	   "\[ \t\]and "     } } */
 /* { dg-final { scan-assembler	   "\[ \t\]or "      } } */
Index: gcc.target/powerpc/p8vector-vectorize-4.c
===================================================================
--- gcc.target/powerpc/p8vector-vectorize-4.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-vectorize-4.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
 
 #ifndef SIZE
Index: gcc.target/powerpc/ppc-pow.c
===================================================================
--- gcc.target/powerpc/ppc-pow.c	(revision 216846)
+++ gcc.target/powerpc/ppc-pow.c	(working copy)
@@ -4,6 +4,7 @@
    and other ppc floating point varients.  However, we need to also eliminate
    Darwin, since it doesn't like -mcpu=power6.  */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O2 -ffast-math -mcpu=power6 -mno-vsx -mno-altivec" } */
 /* { dg-final { scan-assembler-times "fsqrt" 3 } } */
 /* { dg-final { scan-assembler-times "fmul" 1 } } */
Index: gcc.target/powerpc/lhs-2.c
===================================================================
--- gcc.target/powerpc/lhs-2.c	(revision 216846)
+++ gcc.target/powerpc/lhs-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O2 -mcpu=power6 -msched-groups" } */
 /* { dg-final { scan-assembler "ori 1,1,0" } } */
 
Index: gcc.target/powerpc/pr39902-2.c
===================================================================
--- gcc.target/powerpc/pr39902-2.c	(revision 216846)
+++ gcc.target/powerpc/pr39902-2.c	(working copy)
@@ -2,6 +2,7 @@
    float types.  */
 
 /* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-std=gnu99 -O -mcpu=power6" } */
 /* { dg-final { scan-assembler-not "fneg" } } */
 
Index: gcc.target/powerpc/20041111-1.c
===================================================================
--- gcc.target/powerpc/20041111-1.c	(revision 216846)
+++ gcc.target/powerpc/20041111-1.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power4" } } */
 /* { dg-options "-mcpu=power4 -O2" } */
 
 extern unsigned long long set_mask[65];
Index: gcc.target/powerpc/builtins-1.c
===================================================================
--- gcc.target/powerpc/builtins-1.c	(revision 216846)
+++ gcc.target/powerpc/builtins-1.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O0" } */
 
 /* Test that a number of newly added builtin overloads are accepted
Index: gcc.target/powerpc/bcd-3.c
===================================================================
--- gcc.target/powerpc/bcd-3.c	(revision 216846)
+++ gcc.target/powerpc/bcd-3.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 /* { dg-final { scan-assembler-times "bcdadd\[.\] " 4 } } */
 /* { dg-final { scan-assembler-times "bcdsub\[.\] " 4 } } */
Index: gcc.target/powerpc/vsx-vectorize-3.c
===================================================================
--- gcc.target/powerpc/vsx-vectorize-3.c	(revision 216846)
+++ gcc.target/powerpc/vsx-vectorize-3.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
 
 /* Taken from vect/vect-95.c.  */
Index: gcc.target/powerpc/pr57949-1.c
===================================================================
--- gcc.target/powerpc/pr57949-1.c	(revision 216846)
+++ gcc.target/powerpc/pr57949-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc_elfv2 } { "*" } { "" } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 
 /* Verify that vs is 16-byte aligned in the absence of -mcompat-align-parm.  */
Index: gcc.target/powerpc/atomic-p8.c
===================================================================
--- gcc.target/powerpc/atomic-p8.c	(revision 216846)
+++ gcc.target/powerpc/atomic-p8.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 /* { dg-final { scan-assembler-times "lbarx" 7 } } */
 /* { dg-final { scan-assembler-times "lharx" 7 } } */
Index: gcc.target/powerpc/sd-pwr6.c
===================================================================
--- gcc.target/powerpc/sd-pwr6.c	(revision 216846)
+++ gcc.target/powerpc/sd-pwr6.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* powerpc-ibm-aix* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
 /* { dg-require-effective-target dfp } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O2 -mcpu=power6 -mhard-dfp" } */
 /* { dg-final { scan-assembler-not   "lfiwzx"   } } */
 /* { dg-final { scan-assembler-times "lfd"    2 } } */
Index: gcc.target/powerpc/recip-4.c
===================================================================
--- gcc.target/powerpc/recip-4.c	(revision 216846)
+++ gcc.target/powerpc/recip-4.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target powerpc_fprs } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -ftree-vectorize -mrecip -ffast-math -mcpu=power7 -fno-unroll-loops" } */
 /* { dg-final { scan-assembler-times "xvrsqrtedp" 1 } } */
 /* { dg-final { scan-assembler-times "xvmsub.dp" 1 } } */
Index: gcc.target/powerpc/440-maclhwu-2.c
===================================================================
--- gcc.target/powerpc/440-maclhwu-2.c	(revision 216846)
+++ gcc.target/powerpc/440-maclhwu-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "maclhwu\\. " } } */
Index: gcc.target/powerpc/warn-2.c
===================================================================
--- gcc.target/powerpc/warn-2.c	(revision 216846)
+++ gcc.target/powerpc/warn-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O -mcpu=power7 -mno-altivec" } */
 
 /* { dg-warning "-mno-altivec disables vsx" "" { target *-*-* } 1 } */
Index: gcc.target/powerpc/parity-1.c
===================================================================
--- gcc.target/powerpc/parity-1.c	(revision 216846)
+++ gcc.target/powerpc/parity-1.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { ilp32 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -mcpu=power5" } */
 /* { dg-final { scan-assembler "popcntb" } } */
 /* { dg-final { scan-assembler-not "mullw" } } */
Index: gcc.target/powerpc/popcount-2.c
===================================================================
--- gcc.target/powerpc/popcount-2.c	(revision 216846)
+++ gcc.target/powerpc/popcount-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { ilp32 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler "popcntw" } } */
 
Index: gcc.target/powerpc/crypto-builtin-1.c
===================================================================
--- gcc.target/powerpc/crypto-builtin-1.c	(revision 216846)
+++ gcc.target/powerpc/crypto-builtin-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
 
 typedef vector unsigned long long	crypto_t;
Index: gcc.target/powerpc/ppc-fma-5.c
===================================================================
--- gcc.target/powerpc/ppc-fma-5.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fma-5.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do run { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_fprs } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -mcpu=power5 -std=c99" } */
 
 #ifndef __FP_FAST_FMA
Index: gcc.target/powerpc/swaps-p8-8.c
===================================================================
--- gcc.target/powerpc/swaps-p8-8.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-8.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 
 void abort ();
Index: gcc.target/powerpc/pr42747.c
===================================================================
--- gcc.target/powerpc/pr42747.c	(revision 216846)
+++ gcc.target/powerpc/pr42747.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7 -ffast-math" } */
 
 double foo (double x) { return __builtin_sqrt (x); }
Index: gcc.target/powerpc/440-macchwu-2.c
===================================================================
--- gcc.target/powerpc/440-macchwu-2.c	(revision 216846)
+++ gcc.target/powerpc/440-macchwu-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "macchwu\\. " } } */
Index: gcc.target/powerpc/440-mulhhwu-2.c
===================================================================
--- gcc.target/powerpc/440-mulhhwu-2.c	(revision 216846)
+++ gcc.target/powerpc/440-mulhhwu-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "mulhhwu\\. " } } */
Index: gcc.target/powerpc/dfp-dd-2.c
===================================================================
--- gcc.target/powerpc/dfp-dd-2.c	(revision 216846)
+++ gcc.target/powerpc/dfp-dd-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* Test generation of DFP instructions for POWER6.  */
 /* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-std=gnu99 -O1 -mcpu=power6" } */
 
 /* { dg-final { scan-assembler-times "fneg" 1 } } */
Index: gcc.target/powerpc/direct-move-float1.c
===================================================================
--- gcc.target/powerpc/direct-move-float1.c	(revision 216846)
+++ gcc.target/powerpc/direct-move-float1.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 /* { dg-final { scan-assembler "mtvsrd" } } */
 /* { dg-final { scan-assembler "mfvsrd" } } */
Index: gcc.target/powerpc/440-mulchw-2.c
===================================================================
--- gcc.target/powerpc/440-mulchw-2.c	(revision 216846)
+++ gcc.target/powerpc/440-mulchw-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "mulchw\\. " } } */
Index: gcc.target/powerpc/cell_builtin-3.c
===================================================================
--- gcc.target/powerpc/cell_builtin-3.c	(revision 216846)
+++ gcc.target/powerpc/cell_builtin-3.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-O2 -maltivec -mcpu=cell" } */
 /* { dg-final { scan-assembler-times "lvrx" 19 } } */
 
Index: gcc.target/powerpc/swaps-p8-16.c
===================================================================
--- gcc.target/powerpc/swaps-p8-16.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-16.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 /* { dg-final { scan-assembler "lxvd2x" } } */
 /* { dg-final { scan-assembler "stxvd2x" } } */
Index: gcc.target/powerpc/440-macchw-2.c
===================================================================
--- gcc.target/powerpc/440-macchw-2.c	(revision 216846)
+++ gcc.target/powerpc/440-macchw-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "macchw\\. " } } */
Index: gcc.target/powerpc/ppc-fpconv-3.c
===================================================================
--- gcc.target/powerpc/ppc-fpconv-3.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fpconv-3.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
 /* { dg-require-effective-target powerpc_fprs } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -mcpu=power5 -ffast-math" } */
 /* { dg-final { scan-assembler-not "lfiwax" } } */
 /* { dg-final { scan-assembler-not "lfiwzx" } } */
Index: gcc.target/powerpc/dfp-td-2.c
===================================================================
--- gcc.target/powerpc/dfp-td-2.c	(revision 216846)
+++ gcc.target/powerpc/dfp-td-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* Test generation of DFP instructions for POWER6.  */
 /* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-std=gnu99 -O1 -mcpu=power6" } */
 
 /* { dg-final { scan-assembler-times "fneg" 1 } } */
Index: gcc.target/powerpc/p8vector-builtin-5.c
===================================================================
--- gcc.target/powerpc/p8vector-builtin-5.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-builtin-5.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
 
 #include <altivec.h>
Index: gcc.target/powerpc/vsx-builtin-2.c
===================================================================
--- gcc.target/powerpc/vsx-builtin-2.c	(revision 216846)
+++ gcc.target/powerpc/vsx-builtin-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler "xvaddsp" } } */
 /* { dg-final { scan-assembler "xvsubsp" } } */
Index: gcc.target/powerpc/p8vector-vectorize-5.c
===================================================================
--- gcc.target/powerpc/p8vector-vectorize-5.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-vectorize-5.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
 
 #ifndef SIZE
Index: gcc.target/powerpc/lhs-3.c
===================================================================
--- gcc.target/powerpc/lhs-3.c	(revision 216846)
+++ gcc.target/powerpc/lhs-3.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler "ori 2,2,0" } } */
 
Index: gcc.target/powerpc/440-nmachhw-1.c
===================================================================
--- gcc.target/powerpc/440-nmachhw-1.c	(revision 216846)
+++ gcc.target/powerpc/440-nmachhw-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "nmachhw " } } */
Index: gcc.target/powerpc/builtins-2.c
===================================================================
--- gcc.target/powerpc/builtins-2.c	(revision 216846)
+++ gcc.target/powerpc/builtins-2.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 " } */
 
 #include <altivec.h>
Index: gcc.target/powerpc/vsx-vectorize-4.c
===================================================================
--- gcc.target/powerpc/vsx-vectorize-4.c	(revision 216846)
+++ gcc.target/powerpc/vsx-vectorize-4.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
 
 /* Taken from vect/vect-95.c.  */
Index: gcc.target/powerpc/pr52199.c
===================================================================
--- gcc.target/powerpc/pr52199.c	(revision 216846)
+++ gcc.target/powerpc/pr52199.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7 -fmerge-all-constants" } */
 
 struct locale_time_t
Index: gcc.target/powerpc/440-machhwu-1.c
===================================================================
--- gcc.target/powerpc/440-machhwu-1.c	(revision 216846)
+++ gcc.target/powerpc/440-machhwu-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "machhwu " } } */
Index: gcc.target/powerpc/pr57949-2.c
===================================================================
--- gcc.target/powerpc/pr57949-2.c	(revision 216846)
+++ gcc.target/powerpc/pr57949-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc_elfv2 } { "*" } { "" } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7 -mcompat-align-parm" } */
 
 /* Verify that vs is not 16-byte aligned with -mcompat-align-parm.  */
Index: gcc.target/powerpc/recip-5.c
===================================================================
--- gcc.target/powerpc/recip-5.c	(revision 216846)
+++ gcc.target/powerpc/recip-5.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -ftree-vectorize -mrecip=all -ffast-math -mcpu=power7 -fno-unroll-loops" } */
 /* { dg-final { scan-assembler-times "xvredp" 4 } } */
 /* { dg-final { scan-assembler-times "xvresp" 5 } } */
Index: gcc.target/powerpc/popcount-3.c
===================================================================
--- gcc.target/powerpc/popcount-3.c	(revision 216846)
+++ gcc.target/powerpc/popcount-3.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler "popcntd" } } */
 
Index: gcc.target/powerpc/vsx-vector-1.c
===================================================================
--- gcc.target/powerpc/vsx-vector-1.c	(revision 216846)
+++ gcc.target/powerpc/vsx-vector-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -ftree-vectorize -mcpu=power7 -ffast-math" } */
 /* { dg-final { scan-assembler "xvadddp" } } */
 /* { dg-final { scan-assembler "xvsubdp" } } */
Index: gcc.target/powerpc/swaps-p8-1.c
===================================================================
--- gcc.target/powerpc/swaps-p8-1.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-1.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 /* { dg-final { scan-assembler "lxvd2x" } } */
 /* { dg-final { scan-assembler "stxvd2x" } } */
Index: gcc.target/powerpc/optimize-bswapdi-2.c
===================================================================
--- gcc.target/powerpc/optimize-bswapdi-2.c	(revision 216846)
+++ gcc.target/powerpc/optimize-bswapdi-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-require-effective-target stdint_types } */
 /* { dg-require-effective-target lp64 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -mcpu=power5" } */
 
 /* This is a clone of gcc-dg/optimize-bswapdi-1.c, redone to use load and stores
Index: gcc.target/powerpc/ppc-fma-6.c
===================================================================
--- gcc.target/powerpc/ppc-fma-6.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fma-6.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -mcpu=power5 -std=c99 -msoft-float" } */
 /* { dg-final { scan-assembler-not "fmadd" } } */
 /* { dg-final { scan-assembler-not "xsfmadd" } } */
Index: gcc.target/powerpc/vsx-extract-1.c
===================================================================
--- gcc.target/powerpc/vsx-extract-1.c	(revision 216846)
+++ gcc.target/powerpc/vsx-extract-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7" } */
 /* { dg-final { scan-assembler     "lfd"    } } */
 /* { dg-final { scan-assembler-not "lxvd2x" } } */
Index: gcc.target/powerpc/pr48226.c
===================================================================
--- gcc.target/powerpc/pr48226.c	(revision 216846)
+++ gcc.target/powerpc/pr48226.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7" } */
 
 /* The bug shows up if you compile with -maltivec or -mcpu=power7, due to one
Index: gcc.target/powerpc/swaps-p8-9.c
===================================================================
--- gcc.target/powerpc/swaps-p8-9.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-9.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 
 void abort ();
Index: gcc.target/powerpc/pr47755-2.c
===================================================================
--- gcc.target/powerpc/pr47755-2.c	(revision 216846)
+++ gcc.target/powerpc/pr47755-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do run { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target vsx_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7" } */
 
 /* PR 47755: Make sure compiler generates correct code for various
Index: gcc.target/powerpc/direct-move-float2.c
===================================================================
--- gcc.target/powerpc/direct-move-float2.c	(revision 216846)
+++ gcc.target/powerpc/direct-move-float2.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target p8vector_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 
 /* Check whether we get the right bits for direct move at runtime.  */
Index: gcc.target/powerpc/cell_builtin-4.c
===================================================================
--- gcc.target/powerpc/cell_builtin-4.c	(revision 216846)
+++ gcc.target/powerpc/cell_builtin-4.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
-/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-O2 -maltivec -mcpu=cell" } */
 /* { dg-final { scan-assembler-times "lvrxl" 19 } } */
 
Index: gcc.target/powerpc/direct-move-double1.c
===================================================================
--- gcc.target/powerpc/direct-move-double1.c	(revision 216846)
+++ gcc.target/powerpc/direct-move-double1.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 /* { dg-final { scan-assembler "mtvsrd" } } */
 /* { dg-final { scan-assembler "mfvsrd" } } */
Index: gcc.target/powerpc/swaps-p8-17.c
===================================================================
--- gcc.target/powerpc/swaps-p8-17.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-17.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O1" } */
 /* { dg-final { scan-assembler "lxvd2x" } } */
 /* { dg-final { scan-assembler "xxpermdi" } } */
Index: gcc.target/powerpc/ppc-fpconv-4.c
===================================================================
--- gcc.target/powerpc/ppc-fpconv-4.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fpconv-4.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=750" } } */
 /* { dg-options "-O2 -mcpu=750 -ffast-math" } */
 /* { dg-final { scan-assembler-not "lfiwax" } } */
 /* { dg-final { scan-assembler-not "lfiwzx" } } */
Index: gcc.target/powerpc/dfp-td-3.c
===================================================================
--- gcc.target/powerpc/dfp-td-3.c	(revision 216846)
+++ gcc.target/powerpc/dfp-td-3.c	(working copy)
@@ -1,5 +1,6 @@
 /* Test generation of DFP instructions for POWER6.  */
 /* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-std=gnu99 -O1 -mcpu=power6" } */
 
 /* { dg-final { scan-assembler-times "fneg" 1 } } */
Index: gcc.target/powerpc/p8vector-builtin-6.c
===================================================================
--- gcc.target/powerpc/p8vector-builtin-6.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-builtin-6.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 
 vector float dbl_to_float_p8 (double x) { return __builtin_vsx_xscvdpspn (x); }
Index: gcc.target/powerpc/440-nmacchw-1.c
===================================================================
--- gcc.target/powerpc/440-nmacchw-1.c	(revision 216846)
+++ gcc.target/powerpc/440-nmacchw-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "nmacchw " } } */
Index: gcc.target/powerpc/vsx-builtin-3.c
===================================================================
--- gcc.target/powerpc/vsx-builtin-3.c	(revision 216846)
+++ gcc.target/powerpc/vsx-builtin-3.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler "xxsel" } } */
 /* { dg-final { scan-assembler "vperm" } } */
Index: gcc.target/powerpc/440-nmachhw-2.c
===================================================================
--- gcc.target/powerpc/440-nmachhw-2.c	(revision 216846)
+++ gcc.target/powerpc/440-nmachhw-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "nmachhw\\. " } } */
Index: gcc.target/powerpc/vsx-vectorize-5.c
===================================================================
--- gcc.target/powerpc/vsx-vectorize-5.c	(revision 216846)
+++ gcc.target/powerpc/vsx-vectorize-5.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
 
 /* Taken from vect/vect-95.c.  */
Index: gcc.target/powerpc/bool2-p5.c
===================================================================
--- gcc.target/powerpc/bool2-p5.c	(revision 216846)
+++ gcc.target/powerpc/bool2-p5.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -mcpu=power5 -mabi=altivec -mno-altivec -mno-vsx" } */
 /* { dg-final { scan-assembler	   "\[ \t\]and "     } } */
 /* { dg-final { scan-assembler	   "\[ \t\]or "      } } */
Index: gcc.target/powerpc/440-machhwu-2.c
===================================================================
--- gcc.target/powerpc/440-machhwu-2.c	(revision 216846)
+++ gcc.target/powerpc/440-machhwu-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "machhwu\\. " } } */
Index: gcc.target/powerpc/fusion.c
===================================================================
--- gcc.target/powerpc/fusion.c	(revision 216846)
+++ gcc.target/powerpc/fusion.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*le-*-* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -mtune=power8 -O3" } */
 
 #define LARGE 0x12345
Index: gcc.target/powerpc/recip-6.c
===================================================================
--- gcc.target/powerpc/recip-6.c	(revision 216846)
+++ gcc.target/powerpc/recip-6.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target vsx_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O3 -ftree-vectorize -ffast-math -mrecip=all -mrecip-precision" } */
 
 /* Check reciprocal estimate functions for accuracy.  */
Index: gcc.target/powerpc/altivec-cell-6.c
===================================================================
--- gcc.target/powerpc/altivec-cell-6.c	(revision 216846)
+++ gcc.target/powerpc/altivec-cell-6.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile  } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-O2 -maltivec -mabi=altivec -mcpu=cell" } */
 #include <altivec.h>
 
Index: gcc.target/powerpc/pr60102.c
===================================================================
--- gcc.target/powerpc/pr60102.c	(revision 216846)
+++ gcc.target/powerpc/pr60102.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
+/* { dg-options "-mcpu=8548 -mspe -mabi=spe -g -mfloat-gprs=double" } */
 /* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */
-/* { dg-options "-mcpu=8548 -mspe -mabi=spe -g -mfloat-gprs=double" } */
 
 double
 pr60102 (double x, int m)
Index: gcc.target/powerpc/vsx-vector-2.c
===================================================================
--- gcc.target/powerpc/vsx-vector-2.c	(revision 216846)
+++ gcc.target/powerpc/vsx-vector-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -ftree-vectorize -mcpu=power7 -ffast-math" } */
 /* { dg-final { scan-assembler "xvaddsp" } } */
 /* { dg-final { scan-assembler "xvsubsp" } } */
Index: gcc.target/powerpc/swaps-p8-2.c
===================================================================
--- gcc.target/powerpc/swaps-p8-2.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-2.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 /* { dg-final { scan-assembler "lxvd2x" } } */
 /* { dg-final { scan-assembler "stxvd2x" } } */
Index: gcc.target/powerpc/optimize-bswapdi-3.c
===================================================================
--- gcc.target/powerpc/optimize-bswapdi-3.c	(revision 216846)
+++ gcc.target/powerpc/optimize-bswapdi-3.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-require-effective-target stdint_types } */
 /* { dg-require-effective-target lp64 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 
 /* This is a clone of gcc-dg/optimize-bswapdi-1.c, redone to use load and stores
Index: gcc.target/powerpc/ppc-fma-7.c
===================================================================
--- gcc.target/powerpc/ppc-fma-7.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fma-7.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
 /* { dg-require-effective-target powerpc_fprs } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O3 -ftree-vectorize -mcpu=power6 -ffast-math" } */
 /* { dg-final { scan-assembler-times "fmadd" 1 } } */
 /* { dg-final { scan-assembler-times "fmsub " 1 } } */
Index: gcc.target/powerpc/vsx-extract-2.c
===================================================================
--- gcc.target/powerpc/vsx-extract-2.c	(revision 216846)
+++ gcc.target/powerpc/vsx-extract-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7" } */
 /* { dg-final { scan-assembler     "xxlor"  } } */
 /* { dg-final { scan-assembler-not "lfd"    } } */
Index: gcc.target/powerpc/direct-move-long1.c
===================================================================
--- gcc.target/powerpc/direct-move-long1.c	(revision 216846)
+++ gcc.target/powerpc/direct-move-long1.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 /* { dg-final { scan-assembler "mtvsrd" } } */
 /* { dg-final { scan-assembler "mfvsrd" } } */
Index: gcc.target/powerpc/dfp-dd.c
===================================================================
--- gcc.target/powerpc/dfp-dd.c	(revision 216846)
+++ gcc.target/powerpc/dfp-dd.c	(working copy)
@@ -1,6 +1,7 @@
 /* Test generation of DFP instructions for POWER6.  */
 /* Origin: Janis Johnson <janis187@us.ibm.com> */
 /* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-std=gnu99 -mcpu=power6" } */
 
 /* { dg-final { scan-assembler "dadd" } } */
Index: gcc.target/powerpc/swaps-p8-10.c
===================================================================
--- gcc.target/powerpc/swaps-p8-10.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-10.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 
 void abort ();
Index: gcc.target/powerpc/cell_builtin-5.c
===================================================================
--- gcc.target/powerpc/cell_builtin-5.c	(revision 216846)
+++ gcc.target/powerpc/cell_builtin-5.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-O2 -maltivec -mcpu=cell" } */
 /* { dg-final { scan-assembler-times "stvlx" 19 } } */
 
Index: gcc.target/powerpc/direct-move-double2.c
===================================================================
--- gcc.target/powerpc/direct-move-double2.c	(revision 216846)
+++ gcc.target/powerpc/direct-move-double2.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target p8vector_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 
 /* Check whether we get the right bits for direct move at runtime.  */
Index: gcc.target/powerpc/440-mullhw-1.c
===================================================================
--- gcc.target/powerpc/440-mullhw-1.c	(revision 216846)
+++ gcc.target/powerpc/440-mullhw-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "mullhw " } } */
Index: gcc.target/powerpc/ppc-fpconv-5.c
===================================================================
--- gcc.target/powerpc/ppc-fpconv-5.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fpconv-5.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7 -ffast-math" } */
 /* { dg-final { scan-assembler-times "fctiwz" 2 } } */
 /* { dg-final { scan-assembler-times "fctiwuz" 2 } } */
Index: gcc.target/powerpc/440-maclhw-1.c
===================================================================
--- gcc.target/powerpc/440-maclhw-1.c	(revision 216846)
+++ gcc.target/powerpc/440-maclhw-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "maclhw " } } */
Index: gcc.target/powerpc/dfp-td.c
===================================================================
--- gcc.target/powerpc/dfp-td.c	(revision 216846)
+++ gcc.target/powerpc/dfp-td.c	(working copy)
@@ -1,6 +1,7 @@
 /* Test generation of DFP instructions for POWER6.  */
 /* Origin: Janis Johnson <janis187@us.ibm.com> */
 /* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-std=gnu99 -mcpu=power6" } */
 
 /* { dg-final { scan-assembler "daddq" } } */
Index: gcc.target/powerpc/p8vector-builtin-7.c
===================================================================
--- gcc.target/powerpc/p8vector-builtin-7.c	(revision 216846)
+++ gcc.target/powerpc/p8vector-builtin-7.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 
 #include <altivec.h>
Index: gcc.target/powerpc/pr48053-1.c
===================================================================
--- gcc.target/powerpc/pr48053-1.c	(revision 216846)
+++ gcc.target/powerpc/pr48053-1.c	(working copy)
@@ -1,5 +1,6 @@
 /* Test for ICE arising from VSX code generation.  */
 /* { dg-do compile } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7 -funroll-loops" } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
 
Index: gcc.target/powerpc/440-nmacchw-2.c
===================================================================
--- gcc.target/powerpc/440-nmacchw-2.c	(revision 216846)
+++ gcc.target/powerpc/440-nmacchw-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "nmacchw\\. " } } */
Index: gcc.target/powerpc/vsx-builtin-4.c
===================================================================
--- gcc.target/powerpc/vsx-builtin-4.c	(revision 216846)
+++ gcc.target/powerpc/vsx-builtin-4.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler "xvcmpeqdp." } } */
 /* { dg-final { scan-assembler "xvcmpgtdp." } } */
Index: gcc.target/powerpc/pr60676.c
===================================================================
--- gcc.target/powerpc/pr60676.c	(revision 216846)
+++ gcc.target/powerpc/pr60676.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7" } */
 /* { dg-final { scan-assembler "xxsldwi"  } } */
 /* { dg-final { scan-assembler "xxpermdi" } } */
Index: gcc.target/powerpc/pr48258-1.c
===================================================================
--- gcc.target/powerpc/pr48258-1.c	(revision 216846)
+++ gcc.target/powerpc/pr48258-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*le-*-* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7 -mabi=altivec -ffast-math -fno-unroll-loops" } */
 /* { dg-final { scan-assembler-times "xvaddsp" 3 } } */
 /* { dg-final { scan-assembler-times "xvminsp" 3 } } */
Index: gcc.target/powerpc/vsx-vectorize-6.c
===================================================================
--- gcc.target/powerpc/vsx-vectorize-6.c	(revision 216846)
+++ gcc.target/powerpc/vsx-vectorize-6.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
 
 /* Taken from vect/vect-95.c.  */
Index: gcc.target/powerpc/pr48857.c
===================================================================
--- gcc.target/powerpc/pr48857.c	(revision 216846)
+++ gcc.target/powerpc/pr48857.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7 -mabi=altivec" } */
 /* { dg-final { scan-assembler-times "lxvd2x" 1 } } */
 /* { dg-final { scan-assembler-times "stxvd2x" 1 } } */
Index: gcc.target/powerpc/quad-atomic.c
===================================================================
--- gcc.target/powerpc/quad-atomic.c	(revision 216846)
+++ gcc.target/powerpc/quad-atomic.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target p8vector_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 
 /* Test whether we get the right bits for quad word atomic instructions.  */
Index: gcc.target/powerpc/altivec-cell-7.c
===================================================================
--- gcc.target/powerpc/altivec-cell-7.c	(revision 216846)
+++ gcc.target/powerpc/altivec-cell-7.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile  } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-O2 -maltivec -mabi=altivec -mcpu=cell" } */
 /* { dg-final { scan-assembler-times "vor" 2 } } */
 #include <altivec.h>
Index: gcc.target/powerpc/atomic_load_store-p8.c
===================================================================
--- gcc.target/powerpc/atomic_load_store-p8.c	(revision 216846)
+++ gcc.target/powerpc/atomic_load_store-p8.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 /* { dg-final { scan-assembler-times "lq" 1 } } */
 /* { dg-final { scan-assembler-times "stq" 1 } } */
Index: gcc.target/powerpc/vsx-vector-3.c
===================================================================
--- gcc.target/powerpc/vsx-vector-3.c	(revision 216846)
+++ gcc.target/powerpc/vsx-vector-3.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -ftree-vectorize -mcpu=power7" } */
 /* { dg-final { scan-assembler "xvadddp" } } */
 /* { dg-final { scan-assembler "xvsubdp" } } */
Index: gcc.target/powerpc/swaps-p8-3.c
===================================================================
--- gcc.target/powerpc/swaps-p8-3.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-3.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 /* { dg-final { scan-assembler "lxvd2x" } } */
 /* { dg-final { scan-assembler "stxvd2x" } } */
Index: gcc.target/powerpc/pr56605.c
===================================================================
--- gcc.target/powerpc/pr56605.c	(revision 216846)
+++ gcc.target/powerpc/pr56605.c	(working copy)
@@ -1,5 +1,6 @@
 /* PR rtl-optimization/56605 */
 /* { dg-do compile { target { powerpc64-*-* && lp64 } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mvsx -mcpu=power7 -fno-unroll-loops -fdump-rtl-loop2_doloop" } */
 
 void foo (short* __restrict sb, int* __restrict ia)
Index: gcc.target/powerpc/vsx-extract-3.c
===================================================================
--- gcc.target/powerpc/vsx-extract-3.c	(revision 216846)
+++ gcc.target/powerpc/vsx-extract-3.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-O3 -mcpu=power8" } */
 /* { dg-final { scan-assembler     "mfvsrd"  } } */
 /* { dg-final { scan-assembler-not "stfd"    } } */
Index: gcc.target/powerpc/pr53199.c
===================================================================
--- gcc.target/powerpc/pr53199.c	(revision 216846)
+++ gcc.target/powerpc/pr53199.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O2 -mcpu=power6 -mavoid-indexed-addresses" } */
 /* { dg-final { scan-assembler-times "lwbrx" 6 } } */
 /* { dg-final { scan-assembler-times "stwbrx" 6 } } */
Index: gcc.target/powerpc/direct-move-long2.c
===================================================================
--- gcc.target/powerpc/direct-move-long2.c	(revision 216846)
+++ gcc.target/powerpc/direct-move-long2.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
 /* { dg-require-effective-target p8vector_hw } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O2" } */
 
 /* Check whether we get the right bits for direct move at runtime.  */
Index: gcc.target/powerpc/swaps-p8-11.c
===================================================================
--- gcc.target/powerpc/swaps-p8-11.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-11.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 
 #include <altivec.h>
Index: gcc.target/powerpc/vsx-float0.c
===================================================================
--- gcc.target/powerpc/vsx-float0.c	(revision 216846)
+++ gcc.target/powerpc/vsx-float0.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler "xxlxor" } } */
 
Index: gcc.target/powerpc/ppc-target-1.c
===================================================================
--- gcc.target/powerpc/ppc-target-1.c	(revision 216846)
+++ gcc.target/powerpc/ppc-target-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -ffast-math -mcpu=power5 -mabi=altivec" } */
 /* { dg-final { scan-assembler-times "fabs" 3 } } */
 /* { dg-final { scan-assembler-times "fnabs" 3 } } */
Index: gcc.target/powerpc/altivec-20.c
===================================================================
--- gcc.target/powerpc/altivec-20.c	(revision 216846)
+++ gcc.target/powerpc/altivec-20.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target powerpc_altivec_ok } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=G5" } } */
 /* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
 
 #include <altivec.h>
Index: gcc.target/powerpc/cell_builtin-6.c
===================================================================
--- gcc.target/powerpc/cell_builtin-6.c	(revision 216846)
+++ gcc.target/powerpc/cell_builtin-6.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-O2 -maltivec -mcpu=cell" } */
 /* { dg-final { scan-assembler-times "stvlxl" 19 } } */
 
Index: gcc.target/powerpc/440-mullhw-2.c
===================================================================
--- gcc.target/powerpc/440-mullhw-2.c	(revision 216846)
+++ gcc.target/powerpc/440-mullhw-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "mullhw\\. " } } */
Index: gcc.target/powerpc/darwin-ehreturn-1.c
===================================================================
--- gcc.target/powerpc/darwin-ehreturn-1.c	(revision 216846)
+++ gcc.target/powerpc/darwin-ehreturn-1.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile { target powerpc*-*-darwin* } } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=G3" } } */
 /* { dg-options "-mcpu=G3 -funwind-tables" } */
 /* { dg-final { scan-assembler "bl save_world" } } */
 /* { dg-final { scan-assembler ".byte\t0x6b" } } */
Index: gcc.target/powerpc/ppc-fpconv-6.c
===================================================================
--- gcc.target/powerpc/ppc-fpconv-6.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fpconv-6.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
 /* { dg-options "-O3 -mcpu=power6 -ffast-math" } */
 /* { dg-final { scan-assembler-times "fctiwz" 2 } } */
 /* { dg-final { scan-assembler-not "fctiwuz" } } */
Index: gcc.target/powerpc/440-maclhw-2.c
===================================================================
--- gcc.target/powerpc/440-maclhw-2.c	(revision 216846)
+++ gcc.target/powerpc/440-maclhw-2.c	(working copy)
@@ -2,6 +2,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "maclhw\\. " } } */
Index: gcc.target/powerpc/440-dlmzb-strlen-1.c
===================================================================
--- gcc.target/powerpc/440-dlmzb-strlen-1.c	(revision 216846)
+++ gcc.target/powerpc/440-dlmzb-strlen-1.c	(working copy)
@@ -3,6 +3,7 @@
 /* { dg-do compile } */
 /* { dg-skip-if "" { powerpc*-*-aix* } { "*" } { "" } } */
 /* { dg-require-effective-target ilp32 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=440" } } */
 /* { dg-options "-O2 -mcpu=440" } */
 
 /* { dg-final { scan-assembler "dlmzb\\. " } } */
Index: gcc.target/powerpc/pr60137.c
===================================================================
--- gcc.target/powerpc/pr60137.c	(revision 216846)
+++ gcc.target/powerpc/pr60137.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3 -mno-vsx" } */
 
 /* target/60137, compiler got a 'could not split insn error'.  */
Index: gcc.target/powerpc/bswap64-1.c
===================================================================
--- gcc.target/powerpc/bswap64-1.c	(revision 216846)
+++ gcc.target/powerpc/bswap64-1.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power5" } } */
 /* { dg-options "-O2 -mno-popcntd -mcpu=power5" } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-final { scan-assembler "lwbrx" } } */
Index: gcc.target/powerpc/pr48053-2.c
===================================================================
--- gcc.target/powerpc/pr48053-2.c	(revision 216846)
+++ gcc.target/powerpc/pr48053-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* Test for ICE arising from VSX code generation.  */
 /* { dg-do compile } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7" } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
 
Index: gcc.target/powerpc/vsx-builtin-5.c
===================================================================
--- gcc.target/powerpc/vsx-builtin-5.c	(revision 216846)
+++ gcc.target/powerpc/vsx-builtin-5.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler "xxpermdi" } } */
 /* { dg-final { scan-assembler-not "stxvd2x" } } */
Index: gcc.target/powerpc/pr48258-2.c
===================================================================
--- gcc.target/powerpc/pr48258-2.c	(revision 216846)
+++ gcc.target/powerpc/pr48258-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7 -mabi=altivec -ffast-math" } */
 /* { dg-final { scan-assembler "xvadddp" } } */
 /* { dg-final { scan-assembler "xvmindp" } } */
Index: gcc.target/powerpc/vsx-vectorize-7.c
===================================================================
--- gcc.target/powerpc/vsx-vectorize-7.c	(revision 216846)
+++ gcc.target/powerpc/vsx-vectorize-7.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-mcpu=power7 -O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
 
 /* Taken from vect/vect-95.c.  */
Index: gcc.target/powerpc/vsx-sfminmax.c
===================================================================
--- gcc.target/powerpc/vsx-sfminmax.c	(revision 216846)
+++ gcc.target/powerpc/vsx-sfminmax.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7 -ffast-math" } */
 /* { dg-final { scan-assembler "xsmaxdp" } } */
 /* { dg-final { scan-assembler "xsmindp" } } */
Index: gcc.target/powerpc/bool2-p7.c
===================================================================
--- gcc.target/powerpc/bool2-p7.c	(revision 216846)
+++ gcc.target/powerpc/bool2-p7.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler-not "\[ \t\]and "     } } */
 /* { dg-final { scan-assembler-not "\[ \t\]or "      } } */
Index: gcc.target/powerpc/ppc-round.c
===================================================================
--- gcc.target/powerpc/ppc-round.c	(revision 216846)
+++ gcc.target/powerpc/ppc-round.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7" } */
 /* { dg-final { scan-assembler-times "stfiwx" 4 } } */
 /* { dg-final { scan-assembler-times "lfiwax" 2 } } */
Index: gcc.target/powerpc/altivec-cell-8.c
===================================================================
--- gcc.target/powerpc/altivec-cell-8.c	(revision 216846)
+++ gcc.target/powerpc/altivec-cell-8.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do run { target { powerpc*-*-* && cell_hw } } } */
 /* { dg-do compile { target { powerpc*-*-* && { ! cell_hw } } } } */
 /* { dg-require-effective-target powerpc_ppu_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
 /* { dg-options "-O2 -maltivec -mabi=altivec -mcpu=cell" } */
 #include <altivec.h>
 #include <string.h>
Index: gcc.target/powerpc/vsx-vector-4.c
===================================================================
--- gcc.target/powerpc/vsx-vector-4.c	(revision 216846)
+++ gcc.target/powerpc/vsx-vector-4.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -ftree-vectorize -mcpu=power7" } */
 /* { dg-final { scan-assembler "xvaddsp" } } */
 /* { dg-final { scan-assembler "xvsubsp" } } */
Index: gcc.target/powerpc/ppc-fma-1.c
===================================================================
--- gcc.target/powerpc/ppc-fma-1.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fma-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -ftree-vectorize -mcpu=power7 -ffast-math" } */
 /* { dg-final { scan-assembler-times "xvmadd" 4 } } */
 /* { dg-final { scan-assembler-times "xsmadd\|fmadd\ " 2 } } */
Index: gcc.target/powerpc/swaps-p8-4.c
===================================================================
--- gcc.target/powerpc/swaps-p8-4.c	(revision 216846)
+++ gcc.target/powerpc/swaps-p8-4.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-mcpu=power8 -O3" } */
 /* { dg-final { scan-assembler "lxvd2x" } } */
 /* { dg-final { scan-assembler "stxvd2x" } } */
Index: gcc.target/powerpc/ppc-fpconv-10.c
===================================================================
--- gcc.target/powerpc/ppc-fpconv-10.c	(revision 216846)
+++ gcc.target/powerpc/ppc-fpconv-10.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O2 -mcpu=power7 -ffast-math" } */
 /* { dg-final { scan-assembler "xsrdpiz" } } */
 /* { dg-final { scan-assembler-not "friz" } } */
Index: gcc.target/powerpc/pr47755.c
===================================================================
--- gcc.target/powerpc/pr47755.c	(revision 216846)
+++ gcc.target/powerpc/pr47755.c	(working copy)
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
 /* { dg-options "-O3 -mcpu=power7" } */
 /* { dg-final { scan-assembler "xxlxor" } } */
 /* { dg-final { scan-assembler-not "lxvd2x" } } */
