public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Robin Dapp <rdapp.gcc@gmail.com>
To: Richard Biener <rguenther@suse.de>
Cc: rdapp.gcc@gmail.com, gcc-patches <gcc-patches@gcc.gnu.org>,
	Tamar.Christina@arm.com
Subject: Re: [PATCH] match.pd: Use element_mode instead of TYPE_MODE.
Date: Tue, 27 Jun 2023 09:42:04 +0200	[thread overview]
Message-ID: <802f50c6-6e1d-9e93-a75c-ce947bd1784b@gmail.com> (raw)
In-Reply-To: <nycvar.YFH.7.77.849.2306270656260.4723@jbgna.fhfr.qr>

> Why does the expander not have a fallback here?  If we put up
> restrictions like this like we do for vector operations (after
> vector lowering!), we need to document this.  Your check covers
> more than just FP16 types as well which I think is undesirable.

I'm not sure I follow.  What would we fall back to if
(_Float16)a + (_Float16)b is not supported?  Should I provide
a (_Float16)((float)a + (float)b) fallback?  But that would just
undo the simplification we performed.  Or do you mean in optabs
already?

> So it seems for FP16 we need this for correctness (to not ICE)
> while for other modes it might be appropriate for performance
> (though I cannot imagine a target supporting say long double
> not supporting float).

What about something like:

-                  && target_supports_op_p (newtype, op, optab_default)
+                  && (!target_supports_op_p (itype, op, optab_default)
+                      || element_mode (newtype) != HFmode
+                      || target_supports_op_p (newtype, op, optab_default))
?

Regards
 Robin


  reply	other threads:[~2023-06-27  7:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-26 14:26 Robin Dapp
2023-06-26 23:18 ` Jeff Law
2023-06-27  6:30 ` Richard Biener
2023-06-27  6:47   ` Robin Dapp
2023-06-27  7:03     ` Richard Biener
2023-06-27  7:42       ` Robin Dapp [this message]
2023-06-27  8:46         ` Richard Biener
2023-06-27  9:42           ` Robin Dapp
2023-06-27  9:50             ` Richard Biener
2023-06-27  9:55               ` Robin Dapp
2023-06-27 10:05                 ` Richard Biener
2023-06-27 15:55                   ` Robin Dapp
2023-06-27 23:05                     ` Andrew Pinski
2023-06-28  7:27                       ` Andrew Pinski

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=802f50c6-6e1d-9e93-a75c-ce947bd1784b@gmail.com \
    --to=rdapp.gcc@gmail.com \
    --cc=Tamar.Christina@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).