re PR tree-optimization/63962 ([x86] Code pessimization after r217213)
2014-11-20 Richard Biener <rguenther@suse.de> PR middle-end/63962 * match.pd ((p +p off1) +p off2 -> (p +p (off1 + off2))): Guard with single-use operand 0. * gcc.dg/tree-ssa/forwprop-30.c: New testcase. From-SVN: r217828
This commit is contained in:
parent
b00734dfd6
commit
e6121733d5
@ -1,3 +1,9 @@
|
||||
2014-11-20 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/63962
|
||||
* match.pd ((p +p off1) +p off2 -> (p +p (off1 + off2))):
|
||||
Guard with single-use operand 0.
|
||||
|
||||
2014-11-20 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/63677
|
||||
|
@ -370,8 +370,9 @@ along with GCC; see the file COPYING3. If not see
|
||||
|
||||
/* Associate (p +p off1) +p off2 as (p +p (off1 + off2)). */
|
||||
(simplify
|
||||
(pointer_plus (pointer_plus @0 @1) @3)
|
||||
(pointer_plus @0 (plus @1 @3)))
|
||||
(pointer_plus (pointer_plus@2 @0 @1) @3)
|
||||
(if (TREE_CODE (@2) != SSA_NAME || has_single_use (@2))
|
||||
(pointer_plus @0 (plus @1 @3))))
|
||||
|
||||
/* Pattern match
|
||||
tem1 = (long) ptr1;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2014-11-20 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/63962
|
||||
* gcc.dg/tree-ssa/forwprop-30.c: New testcase.
|
||||
|
||||
2014-11-20 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/63677
|
||||
|
15
gcc/testsuite/gcc.dg/tree-ssa/forwprop-30.c
Normal file
15
gcc/testsuite/gcc.dg/tree-ssa/forwprop-30.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -fdump-tree-optimized" } */
|
||||
|
||||
int *p;
|
||||
int *foo (int *q, int i, int j)
|
||||
{
|
||||
p = q + i;
|
||||
return p + j;
|
||||
}
|
||||
|
||||
/* We shouldn't associate (q + i) + j to q + (i + j) here as we
|
||||
need q + i as well. */
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "\\+" 2 "optimized" } } */
|
||||
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
Loading…
Reference in New Issue
Block a user