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
This commit is contained in:
parent
b696101130
commit
a4293fa661
|
@ -1,3 +1,10 @@
|
||||||
|
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>
|
2012-05-18 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/53390
|
PR tree-optimization/53390
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
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>
|
2012-05-18 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
* gcc.dg/pr53352.c: Return zero.
|
* gcc.dg/pr53352.c: Return zero.
|
||||||
|
|
|
@ -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" } } */
|
|
@ -12,7 +12,7 @@ void f()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct s s;
|
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);
|
g(&s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@ int q[100];
|
||||||
void f()
|
void f()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 100; i++) p[i] = 0;
|
for (i = 0; i < 100; i++) p[i] = 1;
|
||||||
g();
|
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" } } */
|
/* { dg-final { scan-assembler "andl\[\\t \]*\\$-16,\[\\t \]*%esp" } } */
|
||||||
|
|
|
@ -9,7 +9,7 @@ void Parse_Vector ()
|
||||||
EXPRESS Express;
|
EXPRESS Express;
|
||||||
int Terms;
|
int Terms;
|
||||||
for (Terms = 0; Terms < 5; Terms++)
|
for (Terms = 0; Terms < 5; Terms++)
|
||||||
Express[Terms] = 0.0;
|
Express[Terms] = 1.0;
|
||||||
Parse_Rel_Factor(Express,&Terms);
|
Parse_Rel_Factor(Express,&Terms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1131,8 +1131,11 @@ ldist_gen (struct loop *loop, struct graph *rdg,
|
||||||
BITMAP_FREE (processed);
|
BITMAP_FREE (processed);
|
||||||
nbp = VEC_length (bitmap, partitions);
|
nbp = VEC_length (bitmap, partitions);
|
||||||
|
|
||||||
if (nbp <= 1
|
if (nbp == 0
|
||||||
|| partition_contains_all_rw (rdg, partitions))
|
|| (nbp == 1
|
||||||
|
&& !can_generate_builtin (rdg, VEC_index (bitmap, partitions, 0)))
|
||||||
|
|| (nbp > 1
|
||||||
|
&& partition_contains_all_rw (rdg, partitions)))
|
||||||
goto ldist_done;
|
goto ldist_done;
|
||||||
|
|
||||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
if (dump_file && (dump_flags & TDF_DETAILS))
|
||||||
|
|
Loading…
Reference in New Issue