From: H.J. Lu Date: Wed, 15 May 2019 15:26:59 +0000 (+0000) Subject: i386: Emulate MMX ssse3_psign3 with SSE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e8b0e9104f2663a0d65cd65e7c4bd25c0b10514b;p=gcc.git i386: Emulate MMX ssse3_psign3 with SSE Emulate MMX ssse3_psign3 with SSE. Only SSE register source operand is allowed. PR target/89021 * config/i386/sse.md (ssse3_psign3): Add SSE emulation. From-SVN: r271246 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8f702f83ca6..406b8795c40 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-05-15 H.J. Lu + + PR target/89021 + * config/i386/sse.md (ssse3_psign3): Add SSE emulation. + 2019-05-15 H.J. Lu PR target/89021 diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 9c2ca68e27b..424faf84621 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -16233,17 +16233,21 @@ (set_attr "mode" "")]) (define_insn "ssse3_psign3" - [(set (match_operand:MMXMODEI 0 "register_operand" "=y") + [(set (match_operand:MMXMODEI 0 "register_operand" "=y,x,Yv") (unspec:MMXMODEI - [(match_operand:MMXMODEI 1 "register_operand" "0") - (match_operand:MMXMODEI 2 "nonimmediate_operand" "ym")] + [(match_operand:MMXMODEI 1 "register_operand" "0,0,Yv") + (match_operand:MMXMODEI 2 "register_mmxmem_operand" "ym,x,Yv")] UNSPEC_PSIGN))] - "TARGET_SSSE3" - "psign\t{%2, %0|%0, %2}"; - [(set_attr "type" "sselog1") + "(TARGET_MMX || TARGET_MMX_WITH_SSE) && TARGET_SSSE3" + "@ + psign\t{%2, %0|%0, %2} + psign\t{%2, %0|%0, %2} + vpsign\t{%2, %1, %0|%0, %1, %2}" + [(set_attr "mmx_isa" "native,x64_noavx,x64_avx") + (set_attr "type" "sselog1") (set_attr "prefix_extra" "1") (set (attr "prefix_rex") (symbol_ref "x86_extended_reg_mentioned_p (insn)")) - (set_attr "mode" "DI")]) + (set_attr "mode" "DI,TI,TI")]) (define_insn "_palignr_mask" [(set (match_operand:VI1_AVX512 0 "register_operand" "=v")