Commit 8d0e5316 by Ira Rosen Committed by Ira Rosen

vect-ifcvt-5.c: Require vect_int.

	* gcc.dg/vect/vect-ifcvt-5.c: Require vect_int.
	* gcc.dg/vect/vect-16.c: Fix comment.
	* gcc.dg/vect/pr33369.c: Require vect_int.
	* gcc.dg/vect/slp-33.c: Add spaces.
	* gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave
	targets.
	* gcc.dg/vect/vect-ifcvt-6.c: Require vect_int.
	* gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack
	targets.
	* gcc.dg/vect/vect-ifcvt-7.c: Require vect_int.
	* gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to
	targets.
	* gcc.dg/vect/slp-10.c: Add spaces.
	* gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc
	targets.
	* gcc.dg/vect/slp-36.c: Require vect_int.
	* gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c,
	gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c,
	gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise.
	* gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack
	targets.
	* gcc.dg/vect/no-scevccp-outer-17.c: Likewise.
	* gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit
	instead of vector_alignment_reachable_for_double.
	* lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*.
	(natural_alignment): Split into...
	(natural_alignment_32, natural_alignment_64): New.
	(vector_alignment_reachable): Depend on natural_alignment_32.
	(vector_alignment_reachable_for_double): Rename to ...
	(vector_alignment_reachable_for_64bit): And depend on
	natural_alignment_64.


Co-Authored-By: Revital Eres <eres@il.ibm.com>

From-SVN: r129529
parent 43029c10
2007-10-21 Ira Rosen <irar@il.ibm.com>
Revital Eres <eres@il.ibm.com>
* gcc.dg/vect/vect-ifcvt-5.c: Require vect_int.
* gcc.dg/vect/vect-16.c: Fix comment.
* gcc.dg/vect/pr33369.c: Require vect_int.
* gcc.dg/vect/slp-33.c: Add spaces.
* gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave
targets.
* gcc.dg/vect/vect-ifcvt-6.c: Require vect_int.
* gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack
targets.
* gcc.dg/vect/vect-ifcvt-7.c: Require vect_int.
* gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to
targets.
* gcc.dg/vect/slp-10.c: Add spaces.
* gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc
targets.
* gcc.dg/vect/slp-36.c: Require vect_int.
* gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c,
gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c,
gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise.
* gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack
targets.
* gcc.dg/vect/no-scevccp-outer-17.c: Likewise.
* gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit
instead of vector_alignment_reachable_for_double.
* lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*.
(natural_alignment): Split into...
(natural_alignment_32, natural_alignment_64): New.
(vector_alignment_reachable): Depend on natural_alignment_32.
(vector_alignment_reachable_for_double): Rename to ...
(vector_alignment_reachable_for_64bit): And depend on
natural_alignment_64.
2007-10-21 Richard Sandiford <rsandifo@nildram.co.uk>
* gcc.dg/vect/vect.exp: Extend -mpaired-single handling to all
......@@ -58,5 +58,5 @@ int main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { ! {vect_unpack } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -64,5 +64,5 @@ int main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { ! {vect_unpack } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -47,5 +47,5 @@ int main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { target vect_interleave } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -48,5 +48,5 @@ int main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { ! {vect_unpack } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -58,5 +58,5 @@ int main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { ! { vect_pack_trunc } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -32,8 +32,8 @@ int main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vector_alignment_reachable_for_double } } } */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vector_alignment_reachable_for_double } } } } */
/* { dg-final { scan-tree-dump-times "vector alignment may not be reachable" 1 "vect" { target { ! vector_alignment_reachable_for_double } } } } */
/* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 1 "vect" { target { ! vector_alignment_reachable_for_double } } } } */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vector_alignment_reachable_for_64bit } } } */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vector_alignment_reachable_for_64bit } } } } */
/* { dg-final { scan-tree-dump-times "vector alignment may not be reachable" 1 "vect" { target { ! vector_alignment_reachable_for_64bit } } } } */
/* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 1 "vect" { target { ! vector_alignment_reachable_for_64bit } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
/* { dg-require-effective-target vect_shift } */
typedef struct tagPOINT
......
......@@ -106,9 +106,9 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {target {vect_intfloat_cvt && vect_int_mult} } } } */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" {target {{! { vect_intfloat_cvt}} && vect_int_mult} } } } */
/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" {target {{! { vect_intfloat_cvt}} && {!{vect_int_mult}}} } } } */
/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" {target {{! { vect_intfloat_cvt}} && { ! {vect_int_mult}}} } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" {target {vect_intfloat_cvt && vect_int_mult} } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" {target {{! { vect_intfloat_cvt}} && vect_int_mult} } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" {target {{! { vect_intfloat_cvt}} && {!{vect_int_mult}}} } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" {target {{! { vect_intfloat_cvt}} && { ! {vect_int_mult}}} } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -104,9 +104,9 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {target {vect_intfloat_cvt && vect_int_mult} } } } */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" {target {{! { vect_intfloat_cvt}} && vect_int_mult} } } } */
/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" {target {{! { vect_intfloat_cvt}} && {!{vect_int_mult}}} } } } */
/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" {target {{! { vect_intfloat_cvt}} && {! {vect_int_mult}}} } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" {target {vect_intfloat_cvt && vect_int_mult} } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" {target {{! { vect_intfloat_cvt}} && vect_int_mult} } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" {target {{! { vect_intfloat_cvt}} && {!{vect_int_mult}}} } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" {target {{! { vect_intfloat_cvt}} && {! {vect_int_mult}}} } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
/* { dg-require-effective-target vect_shift } */
#define N 32
......
......@@ -14,7 +14,6 @@ int main1 ()
float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
float diff;
/* Not vectorizable yet (reduction). */
diff = 0;
for (i = 0; i < N; i++) {
diff += (b[i] - c[i]);
......@@ -34,5 +33,6 @@ int main (void)
return main1 ();
}
/* Requires fast-math. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
/* { dg-do run { target powerpc*-*-* } } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include "tree-vect.h"
......
/* { dg-do run { target powerpc*-*-* } } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include "tree-vect.h"
......
/* { dg-require-effective-target vect_condition } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include <signal.h>
......
/* { dg-require-effective-target vect_condition } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include <signal.h>
......
/* { dg-require-effective-target vect_condition } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include <signal.h>
......
/* { dg-require-effective-target vect_condition } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include <signal.h>
......
/* { dg-require-effective-target vect_condition } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include <signal.h>
......
/* { dg-require-effective-target vect_condition } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include <signal.h>
......
......@@ -65,8 +65,8 @@ int main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target { vect_interleave } } } } */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! { vect_interleave } } } } } */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target { vect_interleave && vect_pack_trunc } } } } */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { { ! { vect_interleave } } && { vect_pack_trunc } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
/* { dg-require-effective-target vect_float } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include <stdio.h>
......
......@@ -1507,7 +1507,6 @@ proc check_effective_target_vect_floatint_cvt { } {
return $et_vect_floatint_cvt_saved
}
# Return 1 is this is an arm target using 32-bit instructions
proc check_effective_target_arm32 { } {
return [check_no_compiler_messages arm32 assembly {
......@@ -2144,8 +2143,9 @@ proc check_effective_target_vect_aligned_arrays { } {
verbose "check_effective_target_vect_aligned_arrays: using cached result" 2
} else {
set et_vect_aligned_arrays_saved 0
if { ([istarget x86_64-*-*]
|| [istarget i?86-*-*]) && [is-effective-target lp64] } {
if { (([istarget x86_64-*-*]
|| [istarget i?86-*-*]) && [is-effective-target lp64])
|| [istarget spu-*-*] } {
set et_vect_aligned_arrays_saved 1
}
}
......@@ -2153,28 +2153,49 @@ proc check_effective_target_vect_aligned_arrays { } {
return $et_vect_aligned_arrays_saved
}
# Return 1 if types are naturally aligned (aligned to their type-size),
# 0 otherwise.
# Return 1 if types of size 32 bit or less are naturally aligned
# (aligned to their type-size), 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_natural_alignment_32 { } {
global et_natural_alignment_32
if [info exists et_natural_alignment_32_saved] {
verbose "check_effective_target_natural_alignment_32: using cached result" 2
} else {
# FIXME: 32bit powerpc: guaranteed only if MASK_ALIGN_NATURAL/POWER.
set et_natural_alignment_32_saved 1
if { ([istarget *-*-darwin*] && [is-effective-target lp64]) } {
set et_natural_alignment_32_saved 0
}
}
verbose "check_effective_target_natural_alignment_32: returning $et_natural_alignment_32_saved" 2
return $et_natural_alignment_32_saved
}
# Return 1 if types of size 64 bit or less are naturally aligned (aligned to their
# type-size), 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_natural_alignment { } {
global et_natural_alignment
proc check_effective_target_natural_alignment_64 { } {
global et_natural_alignment_64
if [info exists et_natural_alignment_saved] {
verbose "check_effective_target_natural_alignment: using cached result" 2
if [info exists et_natural_alignment_64_saved] {
verbose "check_effective_target_natural_alignment_64: using cached result" 2
} else {
# FIXME: 32bit powerpc: guaranteed only if MASK_ALIGN_NATURAL/POWER.
set et_natural_alignment_saved 1
if { ([istarget *-*-darwin*] && [is-effective-target lp64]) } {
set et_natural_alignment_saved 0
set et_natural_alignment_64_saved 0
if { ([is-effective-target lp64] && ![istarget *-*-darwin*])
|| [istarget spu-*-*] } {
set et_natural_alignment_64_saved 1
}
}
verbose "check_effective_target_natural_alignment: returning $et_natural_alignment_saved" 2
return $et_natural_alignment_saved
verbose "check_effective_target_natural_alignment_64: returning $et_natural_alignment_64_saved" 2
return $et_natural_alignment_64_saved
}
# Return 1 if vector alignment is reachable, 0 otherwise.
# Return 1 if vector alignment (for types of size 32 bit or less) is reachable, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
......@@ -2185,7 +2206,7 @@ proc check_effective_target_vector_alignment_reachable { } {
verbose "check_effective_target_vector_alignment_reachable: using cached result" 2
} else {
if { [check_effective_target_vect_aligned_arrays]
|| [check_effective_target_natural_alignment] } {
|| [check_effective_target_natural_alignment_32] } {
set et_vector_alignment_reachable_saved 1
} else {
set et_vector_alignment_reachable_saved 0
......@@ -2195,24 +2216,25 @@ proc check_effective_target_vector_alignment_reachable { } {
return $et_vector_alignment_reachable_saved
}
# Return 1 if vector alignment for soubles is reachable, 0 otherwise.
# Return 1 if vector alignment for 64 bit is reachable, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
proc check_effective_target_vector_alignment_reachable_for_double { } {
global et_vector_alignment_reachable_for_double
proc check_effective_target_vector_alignment_reachable_for_64bit { } {
global et_vector_alignment_reachable_for_64bit
if [info exists et_vector_alignment_reachable_for_double_saved] {
verbose "check_effective_target_vector_alignment_reachable_for_double: using cached result" 2
if [info exists et_vector_alignment_reachable_for_64bit_saved] {
verbose "check_effective_target_vector_alignment_reachable_for_64bit: using cached result" 2
} else {
if { [check_effective_target_vect_aligned_arrays] } {
set et_vector_alignment_reachable_for_double_saved 1
if { [check_effective_target_vect_aligned_arrays]
|| [check_effective_target_natural_alignment_64] } {
set et_vector_alignment_reachable_for_64bit_saved 1
} else {
set et_vector_alignment_reachable_for_double_saved 0
set et_vector_alignment_reachable_for_64bit_saved 0
}
}
verbose "check_effective_target_vector_alignment_reachable_for_double: returning $et_vector_alignment_reachable_for_double_saved" 2
return $et_vector_alignment_reachable_for_double_saved
verbose "check_effective_target_vector_alignment_reachable_for_64bit: returning $et_vector_alignment_reachable_for_64bit_saved" 2
return $et_vector_alignment_reachable_for_64bit_saved
}
# Return 1 if the target supports vector conditional operations, 0 otherwise.
......
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