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

--- Comment #7 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Wed May 15 15:04:08 2019
New Revision: 271215

URL: https://gcc.gnu.org/viewcvs?rev=271215&root=gcc&view=rev
Log:
i386: Emulate MMX packsswb/packssdw/packuswb with SSE2

Emulate MMX packsswb/packssdw/packuswb with SSE packsswb/packssdw/packuswb
plus moving bits 64:95 to bits 32:63 in SSE register.  Only SSE register
source operand is allowed.

        PR target/89021
        * config/i386/i386-expand.c (ix86_move_vector_high_sse_to_mmx):
        New function.
        (ix86_split_mmx_pack): Likewise.
        * config/i386/i386-protos.h (ix86_move_vector_high_sse_to_mmx):
        New prototype.
        (ix86_split_mmx_pack): Likewise.
        * config/i386/i386.md (mmx_isa): New.
        (enabled): Also check mmx_isa.
        * config/i386/mmx.md (any_s_truncate): New code iterator.
        (s_trunsuffix): New code attr.
        (mmx_packsswb): Removed.
        (mmx_packssdw): Likewise.
        (mmx_packuswb): Likewise.
        (mmx_pack<s_trunsuffix>swb): New define_insn_and_split to emulate
        MMX packsswb/packuswb with SSE2.
        (mmx_packssdw): Likewise.
        * config/i386/predicates.md (register_mmxmem_operand): New.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386-expand.c
    trunk/gcc/config/i386/i386-protos.h
    trunk/gcc/config/i386/i386.md
    trunk/gcc/config/i386/mmx.md
    trunk/gcc/config/i386/predicates.md

Reply via email to