public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/53513] [SH] Add support for fschg and fpchg insns and improve fenv support
Date: Tue, 14 Oct 2014 03:46:00 -0000	[thread overview]
Message-ID: <bug-53513-4-3jvDo17akD@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53513-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53513

--- Comment #21 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #17)
> 
> In the 'addsf3_i' pattern, I've tried replacing the
> 
>     (use (match_operand:PSI 3 "fpscr_operand" "c"))
> 
> with
> 
>     (set (match_operand:PSI 3 "fpscr_operand" "=&c")
>          (unspec:PSI [(match_dup 3)] UNSPEC_FPSCR_SET))]
> 
> 
> I haven't checked all the other side effects it could have, but at least the
> FMA combine patterns still seem work after that change.

With those changes above applied to all the other FP insns, the FMA tests in
gcc.target/sh fail.

One problem is that at -O1, FMA patterns won't be expanded initially, but are
rather formed during combine.  With the more complex FPSCA set/use combine
won't match the patterns at -O1 but only at -O2.  This is regression is
probably acceptable.

The other issue is that the fix for PR 56547 doesn't work anymore, because for
some reason combine can't figure out what to do with the 1.0 constant. 
Probably because now it'd need to deal with multiple-set insns, which it
doesn't do well.  Adding a combine bridge pattern doesn't make it go further,
as it won't try to combine 'fpreg = fpreg + 1.0' and 'fpreg = fpreg * fpreg'. 
In this case it's probably better to do a manual fma combine in the split1
pass.  This is more effort, but would also fix the first problem.


  parent reply	other threads:[~2014-10-14  3:46 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29  1:51 [Bug target/53513] New: SH Target: Add support for fschg and fpchg insns olegendo at gcc dot gnu.org
2013-03-10 19:54 ` [Bug target/53513] " olegendo at gcc dot gnu.org
2013-07-31 17:12 ` olegendo at gcc dot gnu.org
2014-03-13 20:48 ` olegendo at gcc dot gnu.org
2014-03-16 20:47 ` olegendo at gcc dot gnu.org
2014-03-16 23:32 ` olegendo at gcc dot gnu.org
2014-03-17  1:30 ` bugdal at aerifal dot cx
2014-03-17  9:09 ` olegendo at gcc dot gnu.org
2014-03-17 11:53 ` chrbr at gcc dot gnu.org
2014-03-17 13:51 ` kkojima at gcc dot gnu.org
2014-03-17 14:23 ` olegendo at gcc dot gnu.org
2014-03-17 15:18 ` chrbr at gcc dot gnu.org
2014-03-17 15:41 ` olegendo at gcc dot gnu.org
2014-05-12  8:47 ` chrbr at gcc dot gnu.org
2014-10-11 21:28 ` olegendo at gcc dot gnu.org
2014-10-11 22:02 ` olegendo at gcc dot gnu.org
2014-10-11 22:09 ` olegendo at gcc dot gnu.org
2014-10-12 14:13 ` olegendo at gcc dot gnu.org
2014-10-13  6:57 ` [Bug target/53513] [SH] Add support for fschg and fpchg insns and improve fenv support olegendo at gcc dot gnu.org
2014-10-13 14:40 ` olegendo at gcc dot gnu.org
2014-10-14  3:46 ` olegendo at gcc dot gnu.org [this message]
2014-10-14 12:26 ` olegendo at gcc dot gnu.org
2014-10-15  0:06 ` olegendo at gcc dot gnu.org
2014-10-15  1:00 ` olegendo at gcc dot gnu.org
2014-10-15  4:02 ` kkojima at gcc dot gnu.org
2014-10-15  8:41 ` olegendo at gcc dot gnu.org
2014-10-15 17:57 ` olegendo at gcc dot gnu.org
2014-10-15 22:08 ` olegendo at gcc dot gnu.org
2014-10-16  1:13 ` kkojima at gcc dot gnu.org
2014-10-16 10:59 ` olegendo at gcc dot gnu.org
2014-10-16 12:12 ` olegendo at gcc dot gnu.org
2014-10-16 13:28 ` kkojima at gcc dot gnu.org
2014-10-16 18:57 ` olegendo at gcc dot gnu.org
2014-10-17  9:22 ` olegendo at gcc dot gnu.org
2014-10-17 17:42 ` olegendo at gcc dot gnu.org
2014-10-17 22:20 ` olegendo at gcc dot gnu.org
2014-10-17 23:16 ` kkojima at gcc dot gnu.org
2014-12-07 23:20 ` olegendo at gcc dot gnu.org
2014-12-10  0:22 ` olegendo at gcc dot gnu.org
2014-12-10  8:32 ` olegendo at gcc dot gnu.org
2014-12-13 13:18 ` olegendo at gcc dot gnu.org
2014-12-14 14:00 ` [Bug target/53513] [SH] Add support for fpchg insn " olegendo at gcc dot gnu.org
2014-12-16 21:29 ` olegendo at gcc dot gnu.org
2014-12-21 17:54 ` olegendo 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-53513-4-3jvDo17akD@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: link
Be 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).