[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2018-05-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094

Richard Biener  changed:

   What|Removed |Added

 CC||herring at lanl dot gov

--- Comment #20 from Richard Biener  ---
*** Bug 80617 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2017-11-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||8.0
 Resolution|--- |FIXED

--- Comment #19 from Richard Biener  ---
Fixed.

[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2017-11-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094

--- Comment #18 from Richard Biener  ---
Author: rguenth
Date: Thu Nov 23 09:05:11 2017
New Revision: 255093

URL: https://gcc.gnu.org/viewcvs?rev=255093=gcc=rev
Log:
2017-11-23  Richard Biener  

PR tree-optimization/23094
* tree-ssa-sccvn.c (vuse_ssa_val): Handle VN_TOP when we
come here from walking over backedges in the first iteration.
(vn_reference_lookup_3): Skip clobbers that store the same value.

* gcc.dg/tree-ssa/ssa-fre-61.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-61.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-sccvn.c

[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2017-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094

Richard Biener  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #17 from Richard Biener  ---
*** Bug 83041 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2017-05-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094

Richard Biener  changed:

   What|Removed |Added

   Attachment #9375|0   |1
is obsolete||

--- Comment #16 from Richard Biener  ---
Created attachment 41347
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41347=edit
patch I'm sitting on

So this is the patch I am sitting on for a while.  It's reasonably a cheap
trick but is at the same time easily fooled by an intermediate (non-aliasing)
store
like in

float *f;
int g(int *a, int *b)
{
  int x = *b;
  *f = 1.;
  *a = x;
  return *b;
}

which is why I haven't pushed it sofar.  OTOH it might be good enough for
the most cases.

To make it more general one would need to store the seen value somewhere
and verify we can use it.  A bit hackish I'd say (well, a new global var
would do, not that we don't already have this kind).

[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2012-07-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 CC||unixoid2003 at mail dot ru

--- Comment #14 from Richard Guenther rguenth at gcc dot gnu.org 2012-07-06 
09:59:28 UTC ---
*** Bug 53870 has been marked as a duplicate of this bug. ***


[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2012-07-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094

--- Comment #15 from Richard Guenther rguenth at gcc dot gnu.org 2012-07-06 
10:06:08 UTC ---
Testcase from PR53870:

int f(int *a, int *b)
{
  *a = *b;
  return *b;
}


[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2008-08-19 Thread rguenth at gcc dot gnu dot org


--- Comment #12 from rguenth at gcc dot gnu dot org  2008-08-19 09:08 
---
Subject: Bug 23094

Author: rguenth
Date: Tue Aug 19 09:06:54 2008
New Revision: 139226

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=139226
Log:
2008-08-19  Richard Guenther  [EMAIL PROTECTED]

PR tree-optimization/35972
PR tree-optimization/23094
* tree-ssa-sccvn.h (vn_reference_lookup_pieces): Add maywalk
parameter.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Properly
handle MISALIGNED_INDIRECT_REF.
(get_ref_from_reference_ops): New helper.
(vn_reference_lookup_pieces): Walk the use-def chain using the
alias-oracle if requested.
* tree-ssa-pre.c (phi_translate_1): Do reference lookup with
walking the use-def chain.
(compute_avail): But not here.
(create_component_ref_by_pieces_1): Properly handle
MISALIGNED_INDIRECT_REF.
(do_regular_insertion): Handle fully redundant
expressions after PHI-translation also for SSA_NAME values, not
only constants.  Correctly use edoubleprime for that.

* gcc.dg/tree-ssa/ssa-pre-19.c: New testcase.
* gcc.dg/autopar/reduc-1.c: Move constant initialized arrays to
global memory.
* gcc.dg/autopar/reduc-1char.c: Likewise.
* gcc.dg/autopar/reduc-1short.c: Likewise.
* gcc.dg/autopar/reduc-2.c: Likewise.
* gcc.dg/autopar/reduc-2char.c: Likewise.
* gcc.dg/autopar/reduc-2short.c: Likewise.
* gcc.dg/autopar/reduc-3.c: Likewise.
* gcc.dg/tree-ssa/ifc-20040816-1.c: Likewise.
* gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c: Likewise.
* gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c: Likewise.
* gcc.dg/vect/fast-math-vect-reduc-5.c: Likewise.
* gcc.dg/vect/fast-math-vect-reduc-7.c: Likewise.
* gcc.dg/vect/no-trapping-math-2.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-111.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-11.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-12.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-13.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-14.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-15.c: Likewise.
* gcc.dg/vect/no-vfa-vect-37.c: Likewise.
* gcc.dg/vect/no-vfa-vect-depend-1.c: Likewise.
* gcc.dg/vect/pr18400.c: Likewise.
* gcc.dg/vect/slp-12b.c: Likewise.
* gcc.dg/vect/slp-14.c: Likewise.
* gcc.dg/vect/slp-7.c: Likewise.
* gcc.dg/vect/slp-15.c: Likewise.
* gcc.dg/vect/slp-16.c: Likewise.
* gcc.dg/vect/slp-17.c: Likewise.
* gcc.dg/vect/slp-24.c: Likewise.
* gcc.dg/vect/slp-28.c: Likewise.
* gcc.dg/vect/slp-3.c: Likewise.
* gcc.dg/vect/slp-34.c: Likewise.
* gcc.dg/vect/slp-6.c: Likewise.
* gcc.dg/vect/slp-8.c: Likewise.
* gcc.dg/vect/vect-107.c: Likewise.
* gcc.dg/vect/vect-108.c: Likewise.
* gcc.dg/vect/vect-11.c: Likewise.
* gcc.dg/vect/vect-112.c: Likewise.
* gcc.dg/vect/vect-115.c: Likewise.
* gcc.dg/vect/vect-11a.c: Likewise.
* gcc.dg/vect/vect-34.c: Likewise.
* gcc.dg/vect/vect-9.c: Likewise.
* gcc.dg/vect/vect-97.c: Likewise.
* gcc.dg/vect/vect-align-1.c: Likewise.
* gcc.dg/vect/vect-float-extend-1.c: Likewise.
* gcc.dg/vect/vect-floatint-conversion-1.c: Likewise.
* gcc.dg/vect/vect-ifcvt-16.c: Likewise.
* gcc.dg/vect/vect-ifcvt-17.c: Likewise.
* gcc.dg/vect/vect-ifcvt-2.c: Likewise.
* gcc.dg/vect/vect-ifcvt-3.c: Likewise.
* gcc.dg/vect/vect-ifcvt-4.c: Likewise.
* gcc.dg/vect/vect-ifcvt-5.c: Likewise.
* gcc.dg/vect/vect-ifcvt-6.c: Likewise.
* gcc.dg/vect/vect-ifcvt-7.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-1.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-2.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-3.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-4a.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-4b.c: Likewise.
* gcc.dg/vect/vect-multitypes-2.c: Likewise.
* gcc.dg/vect/vect-multitypes-5.c: Likewise.
* gcc.dg/vect/vect-reduc-1.c: Likewise.
* gcc.dg/vect/vect-reduc-1char.c: Likewise.
* gcc.dg/vect/vect-reduc-1short.c: Likewise.
* gcc.dg/vect/vect-reduc-2.c: Likewise.
* gcc.dg/vect/vect-reduc-3.c: Likewise.
* gcc.dg/vect/vect-shift-1.c: Likewise.
* gcc.dg/vect/vect-strided-float.c: Likewise.
* gcc.dg/vect/vect-strided-store-u32-i2.c: Likewise.
* gcc.dg/vect/wrapv-vect-reduc-2char.c: Likewise.
* gcc.dg/vect/wrapv-vect-reduc-2short.c: Likewise.
* gcc.dg/tree-ssa/gen-vect-11.c: Likewise.
* gcc.dg/tree-ssa/gen-vect-11a.c: Likewise.

[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2008-08-19 Thread rguenth at gcc dot gnu dot org


--- Comment #13 from rguenth at gcc dot gnu dot org  2008-08-19 09:10 
---
Testcase in comment #10 is fixed.  For the original testcase (and the
copyprop variant) I still have a SCCVN patch pending.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094



[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2008-08-17 Thread rguenth at gcc dot gnu dot org


--- Comment #11 from rguenth at gcc dot gnu dot org  2008-08-17 11:26 
---
The store-ccp testcase in comment #10 is fixed by the patch for PR35972.
Still the requested optimization is also performed by DOM.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094



[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2008-03-18 Thread rguenth at gcc dot gnu dot org


--- Comment #10 from rguenth at gcc dot gnu dot org  2008-03-18 15:31 
---
Similar case that SCCVN could also handle (store_ccp and DOM handle this):

int G;

void __attribute__((noinline))
foo (int i)
{
   if (i  0)
 G = 3;
   else
 G = 3;

   if (G != 3)
 link_error ();
}

int
main ()
{
   foo (0);
   return 0;
}

(I have a patch for this as well, the above testcase is the same as
gcc.dg/tree-ssa/20040721-1.c)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094



[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2008-03-14 Thread rguenth at gcc dot gnu dot org


--- Comment #9 from rguenth at gcc dot gnu dot org  2008-03-14 19:34 ---
I have a patch.  But maybe trying to optimize this is a little bit expensive?


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-08-05 21:07:32 |2008-03-14 19:34:25
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094



[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2006-04-07 Thread pinskia at gcc dot gnu dot org


--- Comment #8 from pinskia at gcc dot gnu dot org  2006-04-08 02:32 ---
Store copy prop has the same issue, testcase:
void foo (int *p, int *q, int t)
{
  *p = t;
  *q = t;
  if (*p != 1)
link_error ();
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094