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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly more readable testcase without warnings, -O3 -mxop:
int a, b[3];
void bar (int *);

void
foo (void)
{
  for (; a < 3; a++)
    b[a] = (a - 1) / 2;
  bar (b);
}

IMHO we can either avoid the TARGET_XOP stuff for 8-byte vector modes, like:
--- gcc/config/i386/i386-expand.c.jj    2021-05-06 10:14:55.486063301 +0200
+++ gcc/config/i386/i386-expand.c       2021-05-06 14:37:58.104025120 +0200
@@ -3653,7 +3653,7 @@ ix86_expand_sse_movcc (rtx dest, rtx cmp
       emit_insn (gen_rtx_SET (dest, x));
       return;
     }
-  else if (TARGET_XOP)
+  else if (TARGET_XOP && (!VECTOR_MODE_P (mode) || GET_MODE_SIZE (mode) != 8))
     {
       op_true = force_reg (mode, op_true);

or add the MMXMODEI xop_pcmov_* patterns.

Reply via email to