public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/107259] New: Vectorize VxHF _Float16 modes using partial vectors without -mavx512vl
@ 2022-10-14  9:06 ubizjak at gmail dot com
  2022-10-14  9:24 ` [Bug target/107259] " rguenth at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: ubizjak at gmail dot com @ 2022-10-14  9:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107259
           Summary: Vectorize VxHF _Float16 modes using partial vectors
                    without -mavx512vl
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ubizjak at gmail dot com
  Target Milestone: ---

The following testcase:

--cut here--
#define N 16

_Float16 r[N], a[N], b[N];

void foo (void)
{
  for (int i = 0; i < N; i++)
    r[i] = a[i] + b[i];
}
--cut here--

can be vectorized with -O2 -mavx512fp16 -mavx512vl, but not when -mavx512vl is
omitted. However, the test can still be vectorized using partial vectors.

The testcase should be vectorized for all N < 32, even without -mavx512vl.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/107259] Vectorize VxHF _Float16 modes using partial vectors without -mavx512vl
  2022-10-14  9:06 [Bug target/107259] New: Vectorize VxHF _Float16 modes using partial vectors without -mavx512vl ubizjak at gmail dot com
@ 2022-10-14  9:24 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-14  9:24 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-*-*

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The question is whether the backend should announce "VL" support and fixup
using masks transparently?

The vectorizer at the moment would require a fully masked loop (it doesn't
support the special case of loop vectorizing just the "last" iteration as
masked).  The SLP vectorizer does not consider using masked larger vectors
either.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-14  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-14  9:06 [Bug target/107259] New: Vectorize VxHF _Float16 modes using partial vectors without -mavx512vl ubizjak at gmail dot com
2022-10-14  9:24 ` [Bug target/107259] " rguenth at gcc dot gnu.org

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).