On Wed, Jul 6, 2011 at 11:25 AM, H.J. Lu <hjl.to...@gmail.com> wrote: > On Wed, Jul 6, 2011 at 6:26 AM, Richard Guenther <rguent...@suse.de> wrote: >> >> This fixes PR49645 - with MEM_REF the value-numbering machinery >> to look through aggregate copies wasn't working reliably as >> we have two representations for X, X and MEM[&X]. The following >> patch fixes that by internally always using the more complicated >> representation. >> >> The patch needs consistent DECL_HARD_REGISTER settings to avoid >> generating MEM_REFs for them though and the C frontend fails >> to set that flag for global variables - hence the c-decl.c part >> (otherwise compile.exp 20041119-1.c ICEs). >> >> Bootstrapped and tested on x86_64-unknown-linux-gnu, are the >> C frontend parts ok for trunk? >> >> Thanks, >> Richard. >> >> 2011-07-06 Richard Guenther <rguent...@suse.de> >> >> PR tree-optimization/49645 >> * c-decl.c (finish_decl): Also set DECL_HARD_REGISTER for global >> register variables. >> * tree-ssa-sccvn.c (vn_reference_op_eq): Disregard differences >> in type qualification here ... >> (copy_reference_ops_from_ref): ... not here. >> (vn_reference_lookup_3): ... or here. >> (copy_reference_ops_from_ref): Record decl bases as MEM[&decl]. >> (vn_reference_lookup): Do the lookup with a valueized ao-ref. >> >> * g++.dg/tree-ssa/pr8781.C: Disable SRA. >> > > This caused: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49662 >
This also caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49770 -- H.J.