aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIra Rosen <ira.rosen@linaro.org>2011-03-27 08:59:10 +0000
committerIra Rosen <irar@gcc.gnu.org>2011-03-27 08:59:10 +0000
commit69d523395b0da6fe5e9178cbe96e57356f32980b (patch)
tree18a0179c177ed69e685702b978e34d4d9dfd47c9
parent60386f50ceca766476f4e22f1c78c56865d9bc9d (diff)
downloadgcc-69d523395b0da6fe5e9178cbe96e57356f32980b.zip
gcc-69d523395b0da6fe5e9178cbe96e57356f32980b.tar.gz
gcc-69d523395b0da6fe5e9178cbe96e57356f32980b.tar.bz2
arm.c (arm_autovectorize_vector_sizes): New function.
* config/arm/arm.c (arm_autovectorize_vector_sizes): New function. (TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_SIZES): Define. From-SVN: r171569
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arm/arm.c10
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-3.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-5.c4
6 files changed, 31 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 54dfbe8..ec394f2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-03-27 Ira Rosen <ira.rosen@linaro.org>
+
+ * config/arm/arm.c (arm_autovectorize_vector_sizes): New
+ function.
+ (TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_SIZES): Define.
+
2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
* basic-block.h (fixup_abnormal_edges): Adjust prototype.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 59ab926..de9e6f9 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -252,6 +252,7 @@ static bool arm_builtin_support_vector_misalignment (enum machine_mode mode,
bool is_packed);
static void arm_conditional_register_usage (void);
static reg_class_t arm_preferred_rename_class (reg_class_t rclass);
+static unsigned int arm_autovectorize_vector_sizes (void);
/* Table of machine attributes. */
@@ -404,6 +405,9 @@ static const struct default_options arm_option_optimization_table[] =
#define TARGET_VECTOR_MODE_SUPPORTED_P arm_vector_mode_supported_p
#undef TARGET_VECTORIZE_PREFERRED_SIMD_MODE
#define TARGET_VECTORIZE_PREFERRED_SIMD_MODE arm_preferred_simd_mode
+#undef TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_SIZES
+#define TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_SIZES \
+ arm_autovectorize_vector_sizes
#undef TARGET_MACHINE_DEPENDENT_REORG
#define TARGET_MACHINE_DEPENDENT_REORG arm_reorg
@@ -23528,6 +23532,12 @@ arm_expand_sync (enum machine_mode mode,
}
}
+static unsigned int
+arm_autovectorize_vector_sizes (void)
+{
+ return TARGET_NEON_VECTORIZE_QUAD ? 16 | 8 : 0;
+}
+
static bool
arm_vector_alignment_reachable (const_tree type, bool is_packed)
{
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7b6dfa3..df0ab83 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2011-03-27 Ira Rosen <ira.rosen@linaro.org>
+
+ * gcc.dg/vect/vect-outer-5.c: Reduce the distance between data
+ accesses to preserve the meaning of the test for doubleword vectors.
+ * gcc.dg/vect/no-vfa-pr29145.c: Likewise.
+ * gcc.dg/vect/slp-3.c: Reduce the loop bound for the same reason.
+
2011-03-26 Janus Weil <janus@gcc.gnu.org>
PR fortran/48291
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c b/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c
index 954474e..507ac25 100644
--- a/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c
@@ -8,7 +8,7 @@ __attribute__ ((noinline))
void with_restrict(int * __restrict p)
{
int i;
- int *q = p - 2;
+ int *q = p - 1;
for (i = 0; i < 1000; ++i) {
p[i] = q[i];
@@ -19,7 +19,7 @@ __attribute__ ((noinline))
void without_restrict(int * p)
{
int i;
- int *q = p - 2;
+ int *q = p - 1;
for (i = 0; i < 1000; ++i) {
p[i] = q[i];
@@ -38,8 +38,8 @@ int main(void)
a[i] = b[i] = i;
}
- with_restrict(a + 2);
- without_restrict(b + 2);
+ with_restrict(a + 1);
+ without_restrict(b + 1);
for (i = 0; i < 1002; ++i) {
if (a[i] != b[i])
diff --git a/gcc/testsuite/gcc.dg/vect/slp-3.c b/gcc/testsuite/gcc.dg/vect/slp-3.c
index 8c99b01..1413936 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-3.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-3.c
@@ -101,7 +101,7 @@ main1 ()
}
/* SLP with unrolling by 8. */
- for (i = 0; i < N/2; i++)
+ for (i = 0; i < N/4; i++)
{
out[i*9] = in[i*9];
out[i*9 + 1] = in[i*9 + 1];
@@ -115,7 +115,7 @@ main1 ()
}
/* check results: */
- for (i = 0; i < N/2; i++)
+ for (i = 0; i < N/4; i++)
{
if (out[i*9] != in[i*9]
|| out[i*9 + 1] != in[i*9 + 1]
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-5.c b/gcc/testsuite/gcc.dg/vect/vect-outer-5.c
index f5027d6..05ed39a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-5.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-5.c
@@ -17,7 +17,7 @@ int main1 ()
float B[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
float C[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
float D[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
- float E[4] = {0,1,2,480};
+ float E[4] = {0,480,960,1440};
float s;
int i, j;
@@ -55,7 +55,7 @@ int main1 ()
s = 0;
for (j=0; j<N; j+=4)
s += C[j];
- B[i+3] = B[i] + s;
+ B[i+1] = B[i] + s;
}
/* check results: */