From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6403 invoked by alias); 25 Apr 2007 15:32:50 -0000 Received: (qmail 6367 invoked by uid 48); 25 Apr 2007 15:32:41 -0000 Date: Wed, 25 Apr 2007 15:32:00 -0000 Message-ID: <20070425153241.6366.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/30567] [4.2 Regression] -O3 optimizer bug In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-04/txt/msg01895.txt.bz2 ------- Comment #29 from rguenth at gcc dot gnu dot org 2007-04-25 16:32 ------- Oh, btw. why the may_aliases bitmap for SMT.11 is empty on entry to the loops computing the transitive closure (it tries to, right?) is that SFT.0 is not considered stored to in the first nested loop over pointers and addressable vars. Shouldn't we add the vars NMT aliases to ai->written_vars in compute_flow_sensitive_aliasing? This also seems to fix the problem: Index: tree-ssa-alias.c =================================================================== *** tree-ssa-alias.c (revision 124151) --- tree-ssa-alias.c (working copy) *************** compute_flow_sensitive_aliasing (struct *** 1142,1152 **** one). Note that only pointers that have been dereferenced will have a name memory tag. */ if (pi->name_mem_tag && pi->pt_vars) ! EXECUTE_IF_SET_IN_BITMAP (pi->pt_vars, 0, j, bi) ! { ! add_may_alias (pi->name_mem_tag, referenced_var (j)); ! add_may_alias (v_ann->symbol_mem_tag, referenced_var (j)); ! } } } --- 1142,1159 ---- one). Note that only pointers that have been dereferenced will have a name memory tag. */ if (pi->name_mem_tag && pi->pt_vars) ! { ! bool stored_to = bitmap_bit_p (ai->dereferenced_ptrs_store, ! DECL_UID (SSA_NAME_VAR (ptr))); ! EXECUTE_IF_SET_IN_BITMAP (pi->pt_vars, 0, j, bi) ! { ! add_may_alias (pi->name_mem_tag, referenced_var (j)); ! if (stored_to) ! bitmap_set_bit (ai->written_vars, ! DECL_UID (referenced_var (j))); ! add_may_alias (v_ann->symbol_mem_tag, referenced_var (j)); ! } ! } } } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30567