public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/110214] New: x86 backend lacks support for vec_pack_ssat_m and vec_pack_usat_m
@ 2023-06-12  5:53 crazylht at gmail dot com
  2023-06-12  8:32 ` [Bug target/110214] " rguenth at gcc dot gnu.org
  2024-04-15 13:29 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: crazylht at gmail dot com @ 2023-06-12  5:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110214
           Summary: x86 backend lacks support for vec_pack_ssat_m and
                    vec_pack_usat_m
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crazylht at gmail dot com
  Target Milestone: ---

This is from PR108410:

> and the key thing to optimize is
> 
>   ivtmp_78 = ivtmp_77 + 4294967232; // -64
>   _79 = MIN_EXPR <ivtmp_78, 255>;
>   _80 = (unsigned char) _79;
>   _81 = {_80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80,
> _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80,
> _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80,
> _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80, _80,
> _80, _80, _80, _80, _80, _80};
> 
> that is we want to broadcast a saturated (to vector element precision) value.


Yes, backend needs to support vec_pack_ssat_m, vec_pack_usat_m.
But I didn't find optab for ss_truncate or us_truncate which might be used by
BB vectorizer.

AVX512 support vpmov{u,}sqd, vpmov{u,}sdw, vpmov{u,}swb for demotion with
signed/unsigned saturation.

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

* [Bug target/110214] x86 backend lacks support for vec_pack_ssat_m and vec_pack_usat_m
  2023-06-12  5:53 [Bug target/110214] New: x86 backend lacks support for vec_pack_ssat_m and vec_pack_usat_m crazylht at gmail dot com
@ 2023-06-12  8:32 ` rguenth at gcc dot gnu.org
  2024-04-15 13:29 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-12  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-06-12
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The BB vectorizer would use the same vec_pack_[us]sat_m, to use these for
vectorizing we'd need pattern matching of saturating [truncation].

For the specific use-case in AXV512 masked epilog vectorization we can also
open-code this with internal-functions.

It might also be interesting to match these in STV?

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

* [Bug target/110214] x86 backend lacks support for vec_pack_ssat_m and vec_pack_usat_m
  2023-06-12  5:53 [Bug target/110214] New: x86 backend lacks support for vec_pack_ssat_m and vec_pack_usat_m crazylht at gmail dot com
  2023-06-12  8:32 ` [Bug target/110214] " rguenth at gcc dot gnu.org
@ 2024-04-15 13:29 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-04-15 13:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110214
Bug 110214 depends on bug 108410, which changed state.

Bug 108410 Summary: x264 averaging loop not optimized well for avx512
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108410

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

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

end of thread, other threads:[~2024-04-15 13:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12  5:53 [Bug target/110214] New: x86 backend lacks support for vec_pack_ssat_m and vec_pack_usat_m crazylht at gmail dot com
2023-06-12  8:32 ` [Bug target/110214] " rguenth at gcc dot gnu.org
2024-04-15 13:29 ` 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).