From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29112 invoked by alias); 10 Mar 2015 13:33:10 -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 28988 invoked by uid 48); 10 Mar 2015 13:33:01 -0000 From: "amodra at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65342] [5 Regression] FAIL: gfortran.dg/intrinsic_(un)?pack_1.f90 -O1 execution test on powerpc-apple-darwin9 after r210201 Date: Tue, 10 Mar 2015 13:33: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: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amodra at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 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: 2015-03/txt/msg01119.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65342 --- Comment #9 from Alan Modra --- As far as fixing the real underlying problem goes, I'm not so familiar with the darwin support that I can state with certainty that you need to fix movdi_low and friends. It might help to explain why powerpc64-linux -mcmodel=medium code doesn't hit the intrinsic_unpack problem even though the resultant code looks very similar to darwin code. We don't see a similar propagation of offset into memory load because legitimate_addres_p() says that isn't valid. It isn't valid because legitimate_constant_pool_address_p (also handles toc-relative medium model addresses) checks alignment. So fwprop and combine don't create the problem memory loads in the first place. However, if we did see such a memory load, reload would fix it for us due to the predicate and constraints in movdi_internal64. Note that having legitimate_address_p() prevent these addresses does mean we lose some optimization opportunites, but on the other hand, if we allowed everything early we'd end up with lots of reloads and probably worse code. You may be able to do something similar in legitimate_address_p for darwin.