public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/55177] missed optimizations with __builtin_bswap Date: Fri, 23 Jan 2015 14:11:00 -0000 [thread overview] Message-ID: <bug-55177-4-YevEj5QrwN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55177-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55177 --- Comment #18 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to David Woodhouse from comment #17) > unsigned or(struct pkt *p) gcc 5.0 optimizes the above case ... > unsigned add(struct pkt *p) ... but not this one. Probably just the case of missing match.pd pattern. >From gcc-bugs-return-474576-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jan 23 14:11:46 2015 Return-Path: <gcc-bugs-return-474576-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 23548 invoked by alias); 23 Jan 2015 14:11:45 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 23045 invoked by uid 48); 23 Jan 2015 14:11:33 -0000 From: "ramana at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/62286] [ARM] 4.9 Regression fails for cortex-m3 for vfp-1.c: fmacs, fmscs, fnmacs, fnmscs Date: Fri, 23 Jan 2015 14:11:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ramana at gcc dot gnu.org X-Bugzilla-Status: NEW 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: <bug-62286-4-eKJQFEmY4o@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-62286-4@http.gcc.gnu.org/bugzilla/> References: <bug-62286-4@http.gcc.gnu.org/bugzilla/> 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-01/txt/msg02570.txt.bz2 Content-length: 1636 https://gcc.gnu.org/bugzilla/show_bug.cgi?idb286 --- Comment #3 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> --- (In reply to ktkachov from comment #2) > (In reply to Ramana Radhakrishnan from comment #1) > > Because the Cortex-M3 doesn't have those instructions ? It's a testism > > probably fixed by an appropriate dg-options values. > > It's not a testism, it's a costs issue. > The FP instructions are dictated by the -mfpu option that is given > (-mfpu=vfp is hardcoded in the dg-options here) and in any case Cortex-M3 > should support the vmla instructions as far as I know. > The RTX costs during combine reject the combination of > > vnmul.f32 s15, s14, s15 > vsub.f32 s15, s15, s13 > > into > vnmla.f32 s15, s13, s14 > > for example. > In particular I think it's the mult_addsub cost. A relevant combine log part > is: > Trying 57 -> 58: > Successfully matched this instruction: > (set (reg:SF 134 [ D.4322 ]) > (plus:SF (mult:SF (reg:SF 130 [ D.4322 ]) > (reg:SF 131 [ D.4322 ])) > (reg:SF 133 [ D.4322 ]))) > (plus:SF (mult:SF (reg:SF 130 [ D.4322 ]) > (reg:SF 131 [ D.4322 ])) > (reg:SF 133 [ D.4322 ])) > > Hot cost: 24 (final) > rejecting combination of insns 57 and 58 > original costs 12 + 8 = 20 > replacement cost 24 > > Is it actually beneficial for Cortex-M3 to split this up? Well, there is no M3 with an FPU and this whole discussion is moot. I don't think the costs should be changed for this if they reflect reality i.e. the cost of a libcall for the multiply and cost of a libcall for addition ! Ramana
next prev parent reply other threads:[~2015-01-23 14:11 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-11-02 9:59 [Bug tree-optimization/55177] New: Missed optimisation: bswap, mask with constant, bswap back again dwmw2 at infradead dot org 2012-11-02 10:46 ` [Bug tree-optimization/55177] " dwmw2 at infradead dot org 2012-11-02 10:56 ` [Bug rtl-optimization/55177] missed optimizations with __builtin_bswap ebotcazou at gcc dot gnu.org 2012-11-02 17:05 ` dwmw2 at infradead dot org 2012-11-02 17:46 ` ebotcazou at gcc dot gnu.org 2012-11-02 19:42 ` dwmw2 at infradead dot org 2012-11-02 21:59 ` ebotcazou at gcc dot gnu.org 2012-11-08 14:30 ` dwmw2 at infradead dot org 2012-11-08 16:14 ` ebotcazou at gcc dot gnu.org 2013-03-08 12:12 ` dwmw2 at infradead dot org 2013-03-08 15:19 ` pinskia at gcc dot gnu.org 2013-03-09 0:06 ` ebotcazou at gcc dot gnu.org 2013-03-09 0:16 ` [Bug tree-optimization/55177] " pinskia at gcc dot gnu.org 2014-04-04 12:40 ` krebbel at gcc dot gnu.org 2014-11-22 22:11 ` pinskia at gcc dot gnu.org 2015-01-23 14:00 ` ubizjak at gmail dot com 2015-01-23 14:08 ` dwmw2 at infradead dot org 2015-01-23 14:11 ` ubizjak at gmail dot com [this message] 2021-11-15 8:30 ` pinskia at gcc dot gnu.org 2021-11-15 8:35 ` pinskia at gcc dot gnu.org 2021-11-15 9:19 ` pinskia at gcc dot gnu.org 2021-11-17 23:40 ` cvs-commit at gcc dot gnu.org 2021-11-17 23:40 ` pinskia at gcc dot gnu.org 2021-11-17 23:41 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-55177-4-YevEj5QrwN@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).