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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <u...@gcc.gnu.org>:

https://gcc.gnu.org/g:5883e567564c5b3caecba0c13e8a360a14cdc846

commit r12-1197-g5883e567564c5b3caecba0c13e8a360a14cdc846
Author: Uros Bizjak <ubiz...@gmail.com>
Date:   Thu Jun 3 20:05:31 2021 +0200

    i386: Add insert and extract patterns for 4-byte vectors [PR100637]

    The patch introduces insert and extract patterns for 4-byte vectors.
    It effectively only emits PINSR and PEXTR instructions when available,
    otherwise falls back to generic code that emulates these instructions
    via inserts, extracts, logic operations and shifts in integer registers.

    Please note that generic fallback produces better code than the current
    approach of constructing new vector in memory (due to store forwarding
stall)
    so also enable QImode 8-byte vector inserts only with TARGET_SSE4_1.

    2021-06-03  Uroš Bizjak  <ubiz...@gmail.com>

    gcc/
            PR target/100637
            * config/i386/i386-expand.c (ix86_expand_vector_set):
            Handle V2HI and V4QI modes.
            (ix86_expand_vector_extract): Ditto.
            * config/i386/mmx.md (*pinsrw): New insn pattern.
            (*pinsrb): Ditto.
            (*pextrw): Ditto.
            (*pextrw_zext): Ditto.
            (*pextrb): Ditto.
            (*pextrb_zext): Ditto.
            (vec_setv2hi): New expander.
            (vec_extractv2hihi): Ditto.
            (vec_setv4qi): Ditto.
            (vec_extractv4qiqi): Ditto.

            (vec_setv8qi): Enable only for TARGET_SSE4_1.
            (vec_extractv8qiqi): Ditto.

    gcc/testsuite/

            PR target/100637
            * gcc.target/i386/vperm-v2hi.c: New test.
            * gcc.target/i386/vperm-v4qi.c: Ditto.

Reply via email to