From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30918 invoked by alias); 12 Aug 2014 11:06:37 -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 30803 invoked by uid 48); 12 Aug 2014 11:06:26 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/62025] [4.9/4.10 Regression] Miscompilation of openssl sha512.c Date: Tue, 12 Aug 2014 11:06: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-Version: 4.9.1 X-Bugzilla-Keywords: wrong-code 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.9.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: 2014-08/txt/msg00751.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62025 --- Comment #13 from Jakub Jelinek --- Just verified the trunk and it is the same thing there, also sched2 generating: al %r3,252(%r8) ahi %r8,128 alc %r2,120(%r8) where the first insn is cc setter, second cc clobber and third cc user and clobber, so the r8=r8+128 insn should not have been scheduled in between those two. It seems scheduler has some code to adjust the address (248 -> 120) based on the r8 adjustment, otherwise it would be wrong to move it even because of r8 register, perhaps if we take that path we don't fully check other side effects (cc clobber in this case). s390 AFAIK doesn't have addition which doesn't clobber flags, unlike many other architectures.