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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I have tried:
--- gcc/config/i386/mmx.md.jj   2021-06-11 11:32:35.813981393 +0200
+++ gcc/config/i386/mmx.md      2021-06-14 13:37:01.483325198 +0200
@@ -3370,7 +3370,9 @@
            (match_operand:V2HI 2 "register_operand" "x,Yw"))
           (parallel [(match_operand 3 "const_0_to_3_operand")
                      (match_operand 4 "const_0_to_3_operand")])))]
-  "TARGET_SSE2"
+  "TARGET_SSE2
+   && ((operands[3] == const0_rtx && INTVAL (operands[4]) == 2)
+       || TARGET_MMX || TARGET_MMX_WITH_SSE)"
   "#"
   "&& reload_completed"
   [(set (match_dup 5)

but it then ICEs on expand_vec_perm_even_odd_1's:
    case E_V2DFmode:
    case E_V4SFmode:
    case E_V2DImode:
    case E_V2SImode:
    case E_V4SImode:
    case E_V2HImode:
      /* These are always directly implementable by expand_vec_perm_1.  */
      gcc_unreachable ();

Reply via email to