From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11731 invoked by alias); 29 Aug 2012 19:06:23 -0000 Received: (qmail 11715 invoked by uid 22791); 29 Aug 2012 19:06:22 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED 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; Wed, 29 Aug 2012 19:05:38 +0000 From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/39423] [4.6/4.7/4.8 Regression] [SH] performance regression: lost mov @(disp,Rn) Date: Wed, 29 Aug 2012 19: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: olegendo at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: chrbr at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.4 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-08/txt/msg01944.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39423 --- Comment #34 from Oleg Endo 2012-08-29 19:05:35 UTC --- Christian, regarding your message on the patches list: http://gcc.gnu.org/ml/gcc-patches/2012-08/msg01861.html I ended up 'fixing' the issue by folding the patterns with iterators. Committed with other foldings as rev. 190781. There are now 3 patterns: "*movsi_index_disp_load", "*movhi_index_disp_load", "*mov_index_disp_store". On a related matter... I've been thinking about PR 50749 (auto-inc-dec opportunities) and PR 53911 (displacement addressing base address selection). As far as I understand it, the proper way of fixing those would be implementing something like General Offset Assignment (GOA) or Address Register Assignment (ARA). Just to see how it could be done, I've replaced the auto-inc-dec pass with my own very early prototype implementation for optimizing address mode selection (currently only with SH addr modes in mind, but could be extended to apply to other targets, too). I'm not sure whether I will be able to get it into shape for 4.8, but early results show that it conflicts with the combine patterns introduced in the fixes for this PR, as it would try to turn the scaled index + displacement addresses into post-inc addresses or normal displacement addresses. The problem here is that SH officially does not support scaled index + displacement addressing, and address mode selection / auto-inc-dec is done before combine. Anyway, until the proper way has been figured out the combine patterns should do as a temporary fix. BTW, DImode and SFmode/DFmode for SH2A are still missing ...