From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28351 invoked by alias); 20 Nov 2012 13:50:43 -0000 Received: (qmail 26954 invoked by uid 48); 20 Nov 2012 13:50:11 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54781] [4.8 Regression] ICE in refs_may_alias_p_1, at tree-ssa-alias.c:1124 Date: Tue, 20 Nov 2012 13:50:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Status Last reconfirmed CC Component Target Milestone Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-11/txt/msg01921.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54781 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-11-20 CC| |jakub at gcc dot gnu.org, | |ramana at gcc dot gnu.org Component|middle-end |target Target Milestone|--- |4.8.0 Ever Confirmed|0 |1 --- Comment #3 from Jakub Jelinek 2012-11-20 13:50:08 UTC --- Looks like a target bug to me, neon_dereference_pointer creates an invalid MEM_REF (the first operand on it doesn't satisfy the required is_gimple_mem_ref_addr predicate) and this invalid MEM_REF is then added by expand_normal into the MEM_EXPR of the MEM, and the aliasing code is then upset about it. In particular, the MEM_REF operand is &z[x_5(D)]. The reason why &z[x_5(D)] is in the CALL_EXPR_ARG of the builtin is expand_call_stmt optimization: /* TER addresses into arguments of builtin functions so we have a chance to infer more correct alignment information. See PR39954. */ Best would be if in this case the backend could find out the original argument, which was a SSA_NAME, and use that as the MEM_REF operand instead, but I'm afraid we don't have such a way right now. So perhaps the backend could clear MEM_EXPR if it is invalid: case NEON_ARG_MEMORY: ... if (MEM_EXPR (op[argc]) && TREE_CODE (MEM_EXPR (op[argc])) == MEM_REF && !is_gimple_mem_ref_addr (TREE_OPERAND (MEM_EXPR (op[argc]), 0))) /* Make sure MEM_EXPR created by neon_dereference_pointer isn't invalid. */ set_mem_expr (op[argc], NULL_RTX);