From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23949 invoked by alias); 10 Jul 2012 22:50:41 -0000 Received: (qmail 23938 invoked by uid 22791); 10 Jul 2012 22:50:39 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED,TW_OV X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Jul 2012 22:50:26 +0000 From: "mikpe at it dot uu.se" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/53908] [4.6/4.7 Regression] csa removes needed memory load Date: Tue, 10 Jul 2012 22:50:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mikpe at it dot uu.se X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.2 X-Bugzilla-Changed-Fields: 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-07/txt/msg00871.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53908 --- Comment #5 from Mikael Pettersson 2012-07-10 22:50:24 UTC --- On x86_64-linux the SEGV went away on trunk with r186159: http://gcc.gnu.org/ml/gcc-cvs/2012-04/msg00108.html http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00202.html The patch description makes it sound more like a cleanup than fixing actual bugs, but when I diff the assembly code for the test case with r186158 and r186159 I see: --- pr53908.s-r186158 2012-07-11 00:28:57.000000000 +0200 +++ pr53908.s-r186159 2012-07-11 00:34:32.000000000 +0200 ... call is_basic testl %eax, %eax - movq 8(%rsp), %rbp - js .L68 -.L29: + js .L29 +.L33: movq users(%rip), %rbx + movq 8(%rsp), %rbp testq %rbx, %rbx ... That is, a load is being moved across a control flow insn. All other diffs seem to just be changed label numbers. I'll give it some more testing tomorrow.