[i386] : Use *mmx_pinsrb some more
diff mbox series

Message ID CAFULd4aBsrv-mxz6NjitoNub-LR=VSHK2ibKNK_bQW7upFYBXQ@mail.gmail.com
State New
Headers show
Series
  • [i386] : Use *mmx_pinsrb some more
Related show

Commit Message

Uros Bizjak Aug. 14, 2019, 6:49 p.m. UTC
We can generate {v,}pinsrb in ix86_expand_vector_init_one_nonzero and
ix86_expand_vector_init_one_var. {v,}pinsrd is already generated where
optimal.

2019-08-14  UroŇ° Bizjak  <ubizjak@gmail.com>

    * config/i386/i386-expand.c (ix86_expand_vector_init_one_nonzero)
    <case E_V8QImode>: Use vector_set path for
    TARGET_MMX_WITH_SSE && TARGET_SSE4_1.
    (ix86_expand_vector_init_one_var) <case E_V8QImode>:
    Do not widen for TARGET_MMX_WITH_SSE && TARGET_SSE4_1.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Committed to mainline SVN.

Uros.

Patch
diff mbox series

diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c
index d1d5a9435f13..b6a2dbf402a1 100644
--- a/gcc/config/i386/i386-expand.c
+++ b/gcc/config/i386/i386-expand.c
@@ -13383,6 +13383,9 @@  ix86_expand_vector_init_one_nonzero (bool mmx_ok, machine_mode mode,
     case E_V8HImode:
       use_vector_set = TARGET_SSE2;
       break;
+    case E_V8QImode:
+      use_vector_set = TARGET_MMX_WITH_SSE && TARGET_SSE4_1;
+      break;
     case E_V4HImode:
       use_vector_set = TARGET_SSE || TARGET_3DNOW_A;
       break;
@@ -13590,6 +13593,8 @@  ix86_expand_vector_init_one_var (bool mmx_ok, machine_mode mode,
       wmode = V8HImode;
       goto widen;
     case E_V8QImode:
+      if (TARGET_MMX_WITH_SSE && TARGET_SSE4_1)
+	break;
       wmode = V4HImode;
       goto widen;
     widen: