From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100414 invoked by alias); 16 Apr 2015 06:00:24 -0000 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 Received: (qmail 100340 invoked by uid 48); 16 Apr 2015 06:00:19 -0000 From: "wangjiefeng at huawei dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/65784] New: after reload, the memrefs_conflict_p is unreliable? Date: Thu, 16 Apr 2015 06:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wangjiefeng at huawei dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg01286.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65784 Bug ID: 65784 Summary: after reload, the memrefs_conflict_p is unreliable? Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: wangjiefeng at huawei dot com int f = -1; int foo(int * pa) { int a = 1; *(pa) = a; pa = pa + f; a = *(pa + 1); return a; } With -O2, the ARM's assembler is as follows: foo: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. movw r3, #:lower16:.LANCHOR0 @ 20 *arm_movsi_insn/4 [length = 4] mov r2, #1 @ 6 *arm_movsi_insn/2 [length = 4] movt r3, #:upper16:.LANCHOR0 @ 21 *arm_movt [length = 4] str r2, [r0] @ 7 *arm_movsi_insn/6 [length = 4] ldr r3, [r3] @ 9 *arm_movsi_insn/5 [length = 4] add r0, r0, r3, asl #2 @ 11 *arith_shiftsi/1 [length = 4] ldr r0, [r0, #4] @ 17 *arm_movsi_insn/5 [length = 4] bx lr @ 26 *arm_return [length = 12] .size foo, .-foo .global f .data .align 2 In sched1, insn 7 and insn 17 has true dependence, but in sched2, the true dependence between insn 7 and insn 17 is omitted. It seems after reload, in function true_dependence_1, the memrefs_conflict_p is unreliable?