This patch skips several Power-specific tests if hard_float support isn't available. OK for trunk?
2011-10-10 Janis Johnson <jani...@codesourcery.com>
* gcc.target/powerpc/ppc-fma-3.c: Require hard_float. * gcc.target/powerpc/ppc-fma-4.c: Likewise. * gcc.target/powerpc/ppc-fma-5.c: Likewise. * gcc.target/powerpc/ppc-fma-7.c: Likewise. * gcc.target/powerpc/ppc-fpconv-11.c: Likewise. * gcc.target/powerpc/ppc-fpconv-3.c: Likewise. * gcc.target/powerpc/ppc-fpconv-7.c: Likewise. * gcc.target/powerpc/ppc-fpconv-8.c: Likewise. * gcc.target/powerpc/ppc-pow.c: Likewise. * gcc.target/powerpc/recip-1.c: Likewise. * gcc.target/powerpc/recip-2.c: Likewise. * gcc.target/powerpc/recip-3.c: Likewise. * gcc.target/powerpc/recip-4.c: Likewise. * gcc.target/powerpc/recip-5.c: Likewise. Index: gcc.target/powerpc/ppc-fma-3.c =================================================================== --- gcc.target/powerpc/ppc-fma-3.c (revision 343951) +++ gcc.target/powerpc/ppc-fma-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-require-effective-target hard_float } */ /* { 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/ppc-fma-4.c =================================================================== --- gcc.target/powerpc/ppc-fma-4.c (revision 343951) +++ gcc.target/powerpc/ppc-fma-4.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-require-effective-target hard_float } */ /* { 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/ppc-fma-5.c =================================================================== --- gcc.target/powerpc/ppc-fma-5.c (revision 343951) +++ gcc.target/powerpc/ppc-fma-5.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do run { target { powerpc*-*-* } } } */ /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ +/* { dg-require-effective-target hard_float } */ /* { dg-options "-O2 -mcpu=power5 -std=c99" } */ #ifndef __FP_FAST_FMA Index: gcc.target/powerpc/ppc-fma-7.c =================================================================== --- gcc.target/powerpc/ppc-fma-7.c (revision 343951) +++ gcc.target/powerpc/ppc-fma-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-require-effective-target hard_float } */ /* { 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/ppc-fpconv-11.c =================================================================== --- gcc.target/powerpc/ppc-fpconv-11.c (revision 343951) +++ gcc.target/powerpc/ppc-fpconv-11.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ +/* { dg-require-effective-target hard_float } */ /* { dg-options "-O2 -mcpu=power5+ -ffast-math" } */ /* { dg-final { scan-assembler-not "xsrdpiz" } } */ /* { dg-final { scan-assembler "friz" } } */ Index: gcc.target/powerpc/ppc-fpconv-3.c =================================================================== --- gcc.target/powerpc/ppc-fpconv-3.c (revision 343951) +++ gcc.target/powerpc/ppc-fpconv-3.c (working copy) @@ -1,6 +1,7 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-require-effective-target hard_float } * /* { dg-options "-O2 -mcpu=power5 -ffast-math" } */ /* { dg-final { scan-assembler-not "lfiwax" } } */ /* { dg-final { scan-assembler-not "lfiwzx" } } */ Index: gcc.target/powerpc/ppc-fpconv-7.c =================================================================== --- gcc.target/powerpc/ppc-fpconv-7.c (revision 343951) +++ gcc.target/powerpc/ppc-fpconv-7.c (working copy) @@ -1,6 +1,7 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-require-effective-target hard_float } * /* { dg-options "-O3 -mcpu=power5 -ffast-math" } */ /* { dg-final { scan-assembler-times "fctiwz" 2 } } */ /* { dg-final { scan-assembler-not "fctiwuz" } } */ Index: gcc.target/powerpc/ppc-fpconv-8.c =================================================================== --- gcc.target/powerpc/ppc-fpconv-8.c (revision 343951) +++ gcc.target/powerpc/ppc-fpconv-8.c (working copy) @@ -1,6 +1,7 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-require-effective-target hard_float } * /* { dg-options "-O3 -mcpu=750 -ffast-math" } */ /* { dg-final { scan-assembler-times "fctiwz" 6 } } */ /* { dg-final { scan-assembler-not "fctiwuz" } } */ Index: gcc.target/powerpc/ppc-pow.c =================================================================== --- gcc.target/powerpc/ppc-pow.c (revision 343951) +++ gcc.target/powerpc/ppc-pow.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */ +/* { dg-require-effective-target hard_float } */ /* { dg-options "-O2 -ffast-math -mcpu=power6" } */ /* { dg-final { scan-assembler-times "fsqrt" 3 } } */ /* { dg-final { scan-assembler-times "fmul" 1 } } */ Index: gcc.target/powerpc/recip-1.c =================================================================== --- gcc.target/powerpc/recip-1.c (revision 343951) +++ gcc.target/powerpc/recip-1.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */ +/* { dg-require-effective-target hard_float } */ /* { 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/recip-2.c =================================================================== --- gcc.target/powerpc/recip-2.c (revision 343951) +++ gcc.target/powerpc/recip-2.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */ +/* { dg-require-effective-target hard_float } */ /* { 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/recip-3.c =================================================================== --- gcc.target/powerpc/recip-3.c (revision 343951) +++ gcc.target/powerpc/recip-3.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */ +/* { dg-require-effective-target hard_float } */ /* { dg-options "-O2 -mrecip -ffast-math -mcpu=power7" } */ /* { dg-final { scan-assembler-times "xsrsqrtedp" 1 } } */ /* { dg-final { scan-assembler-times "xsmsub.dp" 1 } } */ Index: gcc.target/powerpc/recip-4.c =================================================================== --- gcc.target/powerpc/recip-4.c (revision 343951) +++ gcc.target/powerpc/recip-4.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ +/* { dg-require-effective-target hard_float } */ /* { 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/recip-5.c =================================================================== --- gcc.target/powerpc/recip-5.c (revision 343951) +++ gcc.target/powerpc/recip-5.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ +/* { dg-require-effective-target hard_float } */ /* { 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 } } */