From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10541 invoked by alias); 13 Aug 2014 04:22:17 -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 10463 invoked by uid 48); 13 Aug 2014 04:22:07 -0000 From: "amker.cheng at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/62025] [4.9/4.10 Regression] Miscompilation of openssl sha512.c Date: Wed, 13 Aug 2014 04:22: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: amker.cheng at gmail dot com 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: cc 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/msg00813.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62025 bin.cheng changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amker.cheng at gmail dot com --- Comment #19 from bin.cheng --- (In reply to Jeffrey A. Law from comment #16) > In reference to c#12. I think the ivopts changes are just setting up the > situation that is mis-handled later. I'd gotten as far as seeing the +128 > increment moving in the scheduler, but hadn't looked to see if it was valid. > > Anyway, so yes I think the ivopts stuff is fine. > > I should have realized I was chasing something of that nature when the > bisection settled on the ivopts code as the trigger. Yes, The scheduling behavior is triggered by specific offset in this case. It changes below insn sequence: 11405: ...... 11406: {%r2:SI=ltu(%cc:CCL1,0)+%r2:SI+[%r8:SI+0xf8];clobber %cc:CC;} ...... 2803: {%r8:SI=%r8:SI+0x80;clobber %cc:CC;} REG_UNUSED %cc:CC into: 11405: ...... 2803: {%r8:SI=%r8:SI+0x80;clobber %cc:CC;} REG_UNUSED %cc:CC 11406: {%r2:SI=ltu(%cc:CCL1,0)+%r2:SI+[%r8:SI+0x78];clobber %cc:CC;} by changing the offset in insn 11406. The problem is why minipass in http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00155.html would do this transformation. According to the description, it is to change rn++ rm=[rn] into rm=[rn+4] rn++ Here it is exactly the opposite tranformation and introducing more dependency. Thanks.