Commit bfcb9121 by Josh Conner Committed by Josh Conner

re PR target/30485 (ICE in rs6000_emit_vector_compare when building with -fno-trapping-math)

2007-01-18  Josh Conner  <jconner@apple.com>

	PR target/30485
	* gcc.dg/vect/vect.exp: Add support for no-trapping-math tests.
	* gcc.dg/vect/no-trapping-math-1: New.
	* gcc.dg/vect/no-trapping-math-2: New.

From-SVN: r120903
parent 370df7db
2007-01-18 Josh Conner <jconner@apple.com>
PR target/30485
* gcc.dg/vect/vect.exp: Add support for no-trapping-math tests.
* gcc.dg/vect/no-trapping-math-1: New.
* gcc.dg/vect/no-trapping-math-2: New.
2007-01-18 Uros Bizjak <ubizjak@gmail.com> 2007-01-18 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/i386/387-8.c: Update comment about optimizing * gcc.target/i386/387-8.c: Update comment about optimizing
/* Test for pr30485. */
/* { dg-do compile } */
/* { dg-require-effective-target vect_condition } */
void
foo (float a[32], float b[2][32])
{
int i;
for (i = 0; i < 32; i++)
a[i] = (b[0][i] > b[1][i]) ? b[0][i] : b[1][i];
}
/* { dg-final { cleanup-tree-dump "vect" } } */
/* Test for pr30485. */
/* { dg-require-effective-target vect_float } */
#include <stdarg.h>
#include "tree-vect.h"
#define N 16
int
main1 (void)
{
int i;
float a[N];
float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
/* Condition in loop. */
/* This loop is vectorized on platforms that support vect_condition. */
for (i = 0; i < N; i++)
{
a[i] = (b[i] > 0 ? b[i] : 0);
}
for (i = 0; i < N; i++)
{
if (a[i] != b[i])
abort ();
}
return 0;
}
int main (void)
{
check_vect ();
return main1 ();
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_condition } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
...@@ -150,6 +150,12 @@ lappend DEFAULT_VECTCFLAGS "-funswitch-loops" ...@@ -150,6 +150,12 @@ lappend DEFAULT_VECTCFLAGS "-funswitch-loops"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/unswitch-loops-*.\[cS\]]] \ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/unswitch-loops-*.\[cS\]]] \
"" $DEFAULT_VECTCFLAGS "" $DEFAULT_VECTCFLAGS
# -fno-trapping-math tests
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
lappend DEFAULT_VECTCFLAGS "-fno-trapping-math"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-trapping-math-*.\[cS\]]] \
"" $DEFAULT_VECTCFLAGS
# With -Os # With -Os
lappend DEFAULT_VECTCFLAGS "-Os" lappend DEFAULT_VECTCFLAGS "-Os"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/Os-vect-*.\[cS\]]] \ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/Os-vect-*.\[cS\]]] \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment