aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-05-18 13:10:01 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-05-18 13:10:01 +0000
commita4293fa6610acbe4412370b586122fc40615eeb9 (patch)
tree4e98652695c14046eb004e4e4112b7c6cfbc9512 /gcc
parentb69610113089a08d9e142dc8ad52caa3cc8e70c3 (diff)
downloadgcc-a4293fa6610acbe4412370b586122fc40615eeb9.zip
gcc-a4293fa6610acbe4412370b586122fc40615eeb9.tar.gz
gcc-a4293fa6610acbe4412370b586122fc40615eeb9.tar.bz2
re PR target/53346 (Bad if conversion in cptrf2 of rnflow.f90)
2012-05-18 Richard Guenther <rguenther@suse.de> PR tree-optimization/53346 * tree-loop-distribution.c (ldist_gen): Make sure to apply builtin transform even when only a single partition with all reads/writes exists. * gcc.dg/tree-ssa/ldist-18.c: New testcase. * gcc.target/i386/incoming-10.c: Adjust. * gcc.target/i386/incoming-11.c: Likewise. * gcc.target/i386/pr46295.c: Likewise. From-SVN: r187655
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-18.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/incoming-10.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/incoming-11.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/pr46295.c2
-rw-r--r--gcc/tree-loop-distribution.c7
7 files changed, 36 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 70571cd..b0d92ae 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2012-05-18 Richard Guenther <rguenther@suse.de>
+ PR tree-optimization/53346
+ * tree-loop-distribution.c (ldist_gen): Make sure to apply
+ builtin transform even when only a single partition with
+ all reads/writes exists.
+
+2012-05-18 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/53390
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Ignore
strided loads.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d5dfbd1..87941bd 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,13 @@
2012-05-18 Richard Guenther <rguenther@suse.de>
+ PR tree-optimization/53346
+ * gcc.dg/tree-ssa/ldist-18.c: New testcase.
+ * gcc.target/i386/incoming-10.c: Adjust.
+ * gcc.target/i386/incoming-11.c: Likewise.
+ * gcc.target/i386/pr46295.c: Likewise.
+
+2012-05-18 Richard Guenther <rguenther@suse.de>
+
* gcc.dg/pr53352.c: Return zero.
2012-05-18 Richard Guenther <rguenther@suse.de>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-18.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-18.c
new file mode 100644
index 0000000..893ab8b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-18.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
+
+void foo (int *p, int n)
+{
+ int i;
+ for (i = 0; i < n; ++i)
+ p[i] = 0;
+}
+
+/* { dg-final { scan-tree-dump "generated memset zero" "ldist" } } */
+/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.target/i386/incoming-10.c b/gcc/testsuite/gcc.target/i386/incoming-10.c
index 1fb9ef4..612fa72 100644
--- a/gcc/testsuite/gcc.target/i386/incoming-10.c
+++ b/gcc/testsuite/gcc.target/i386/incoming-10.c
@@ -12,7 +12,7 @@ void f()
{
int i;
struct s s;
- for (i = 0; i < sizeof(s.x) / sizeof(*s.x); i++) s.x[i] = 0;
+ for (i = 0; i < sizeof(s.x) / sizeof(*s.x); i++) s.x[i] = 1;
g(&s);
}
diff --git a/gcc/testsuite/gcc.target/i386/incoming-11.c b/gcc/testsuite/gcc.target/i386/incoming-11.c
index a7b7db5..a830c96 100644
--- a/gcc/testsuite/gcc.target/i386/incoming-11.c
+++ b/gcc/testsuite/gcc.target/i386/incoming-11.c
@@ -10,9 +10,9 @@ int q[100];
void f()
{
int i;
- for (i = 0; i < 100; i++) p[i] = 0;
+ for (i = 0; i < 100; i++) p[i] = 1;
g();
- for (i = 0; i < 100; i++) q[i] = 0;
+ for (i = 0; i < 100; i++) q[i] = 1;
}
/* { dg-final { scan-assembler "andl\[\\t \]*\\$-16,\[\\t \]*%esp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr46295.c b/gcc/testsuite/gcc.target/i386/pr46295.c
index b7fccb7..4ac7c10 100644
--- a/gcc/testsuite/gcc.target/i386/pr46295.c
+++ b/gcc/testsuite/gcc.target/i386/pr46295.c
@@ -9,7 +9,7 @@ void Parse_Vector ()
EXPRESS Express;
int Terms;
for (Terms = 0; Terms < 5; Terms++)
- Express[Terms] = 0.0;
+ Express[Terms] = 1.0;
Parse_Rel_Factor(Express,&Terms);
}
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 0d21763..d7506e6 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -1131,8 +1131,11 @@ ldist_gen (struct loop *loop, struct graph *rdg,
BITMAP_FREE (processed);
nbp = VEC_length (bitmap, partitions);
- if (nbp <= 1
- || partition_contains_all_rw (rdg, partitions))
+ if (nbp == 0
+ || (nbp == 1
+ && !can_generate_builtin (rdg, VEC_index (bitmap, partitions, 0)))
+ || (nbp > 1
+ && partition_contains_all_rw (rdg, partitions)))
goto ldist_done;
if (dump_file && (dump_flags & TDF_DETAILS))