From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13304 invoked by alias); 11 Aug 2012 20:26:00 -0000 Received: (qmail 13289 invoked by uid 22791); 11 Aug 2012 20:25:59 -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; Sat, 11 Aug 2012 20:25:46 +0000 From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54089] [SH] Refactor shift patterns Date: Sat, 11 Aug 2012 20:26: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: enhancement X-Bugzilla-Who: olegendo at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: olegendo at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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/msg00659.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54089 --- Comment #12 from Oleg Endo 2012-08-11 20:25:45 UTC --- (In reply to comment #9) > (In reply to comment #8) > > #define SH_DYNAMIC_SHIFT_COST (TARGET_DYNSHIFT ? 1 : 20) > > Sounds reasonable. Perhaps some historical reason for the original > one, though I don't know why. Could you run SCiBE tests with it? I've checked result-size for -m2a-single -mb -O2 ... In total there's a decrease of 1728 bytes, with a few cases where there are increases. I've briefly checked out why code gets bigger in those cases. As far as I can see at the moment, one reason is because right shifts are dynamicalized (converted to dynamic shift insns) although it's not really beneficial. I think I'll try to brush up the right shifts patterns first, then try again.