From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17269 invoked by alias); 7 Jul 2015 12:44:51 -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 17218 invoked by uid 48); 7 Jul 2015 12:44:47 -0000 From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/64036] [SH] Evaluate re-enabling scheduling before RA Date: Tue, 07 Jul 2015 12:44: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: olegendo at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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-07/txt/msg00542.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64036 --- Comment #3 from Oleg Endo --- I've just tried the following example on the AMS branch: float fun (float* x) { return x[0] + x[1] + x[2] + x[3]; } no AMS: mov r4,r1 add #4,r1 fmov.s @r4,fr0 fmov.s @r1,fr1 mov r4,r1 add #8,r1 fadd fr1,fr0 fmov.s @r1,fr1 add #12,r4 fadd fr1,fr0 fmov.s @r4,fr1 rts fadd fr1,fr0 AMS: fmov.s @r4+,fr0 fmov.s @r4+,fr1 fadd fr1,fr0 << load dependency stall fmov.s @r4+,fr1 fadd fr1,fr0 << load dependency stall fmov.s @r4,fr1 rts fadd fr1,fr0 AMS + sched1: fmov.s @r4+,fr0 fmov.s @r4+,fr1 fmov.s @r4+,fr2 fadd fr1,fr0 << no stall fmov.s @r4,fr1 fadd fr2,fr0 << no stall rts fadd fr1,fr0 The sched1 code seems better and it might make sense to enable sched1 after AMS. In sh.c there is ... else if (flag_exceptions) { if (flag_schedule_insns && global_options_set.x_flag_schedule_insns) warning (0, "ignoring -fschedule-insns because of exception " "handling bug"); flag_schedule_insns = 0; } ... which makes it impossible to enable sched1 for C++ code unless exceptions are disabled. Kaz, do you know whether this is still an issue?