* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129529
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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" } } */
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" } } */
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" } } */
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" } } */
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" } } */
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
/* { 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-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
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]);
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>
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>
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 {
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
}
}
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.
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
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.