[Bug tree-optimization/33291] [4.3 Regression] a+=2; a+=2 not simplified to a+=4; with -O3 (ok with gcc-4.2.1)

2007-09-04 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2007-09-04 08:39 ---
Subject: Bug 33291

Author: rguenth
Date: Tue Sep  4 08:38:56 2007
New Revision: 128068

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=128068
Log:
2007-09-04  Richard Guenther  [EMAIL PROTECTED]

PR tree-optimization/33291
* tree-pretty-print.c (dump_generic_node): Dump all
qualifiers for pointer types, not only first.  Dump
qualifiers for aggregate types as well.
* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Always
use the canonical type for building ARRAY_REFs.
* gimplify.c (canonicalize_addr_expr): Clean up.  The
correct validness check is compatibility of the pointer
types.  Always use the canonical type for building
ARRAY_REFs and ADDR_EXPRs.
* tree-ssa-forwprop.c (forward_propagate_addr_expr): Revert
change that disabled propagation of ADDR_EXPRs into statements
with volatile ops.

* gcc.dg/volatile2.c: New testcase.
* gcc.dg/pr32721.c: Adjust volatile reference pattern.
* gcc.dg/tree-ssa/forwprop-1.c: Remove xfail.
* gcc.dg/tree-ssa/forwprop-2.c: Likewise.
* gcc.dg/tree-ssa/pr17141-1.c: Likewise.

Added:
trunk/gcc/testsuite/gcc.dg/volatile2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimplify.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/pr32721.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/forwprop-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/forwprop-2.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr17141-1.c
trunk/gcc/tree-pretty-print.c
trunk/gcc/tree-ssa-ccp.c
trunk/gcc/tree-ssa-forwprop.c


-- 


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



[Bug tree-optimization/33291] [4.3 Regression] a+=2; a+=2 not simplified to a+=4; with -O3 (ok with gcc-4.2.1)

2007-09-04 Thread rguenth at gcc dot gnu dot org


--- Comment #6 from rguenth at gcc dot gnu dot org  2007-09-04 08:41 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/33291] [4.3 Regression] a+=2; a+=2 not simplified to a+=4; with -O3 (ok with gcc-4.2.1)

2007-09-04 Thread wouter dot vermaelen at scarlet dot be


--- Comment #7 from wouter dot vermaelen at scarlet dot be  2007-09-04 
12:11 ---
Thanks for looking into this so quickly!

I confirm the problem is solved for the reduced testcase. However in my
original code the dead-store is not eliminated. Do you want me to file a
separate bug report for that?


mov(%rbx),%edx
movzbl %cl,%edi
lea0x3(%rdx),%r8d
add$0x5,%edx
mov%r8d,(%rbx)
movzbl (%rsi,%rdi,1),%eax
mov%edx,(%rbx)



-- 

wouter dot vermaelen at scarlet dot be changed:

   What|Removed |Added

   Severity|normal  |minor


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



[Bug tree-optimization/33291] [4.3 Regression] a+=2; a+=2 not simplified to a+=4; with -O3 (ok with gcc-4.2.1)

2007-09-04 Thread rguenth at gcc dot gnu dot org


--- Comment #8 from rguenth at gcc dot gnu dot org  2007-09-04 12:13 ---
Yes please.


-- 


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



[Bug tree-optimization/33291] [4.3 Regression] a+=2; a+=2 not simplified to a+=4; with -O3 (ok with gcc-4.2.1)

2007-09-03 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  Known to fail||4.3.0
  Known to work||4.2.1
Summary|a+=2; a+=2  not simplified  |[4.3 Regression] a+=2; a+=2
   |to  a+=4;  with -O3   (ok   |not simplified to  a+=4;
   |with gcc-4.2.1) |with -O3   (ok with gcc-
   ||4.2.1)
   Target Milestone|--- |4.3.0


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