http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48708

           Summary: Invalid V2DI vector set insn generated
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ubiz...@gmail.com


Following testcase, derived from PR48678:

#include <emmintrin.h>

typedef long long T __attribute__((may_alias));
struct S { __m128i d; };

__m128i
foo (long long *x, struct S *y, __m128i *z)
{
  struct S s = *y;
  ((T *) &s.d)[0] = *x;
  return _mm_cmpeq_epi16 (s.d, *z);
}

ICEs with invalid insn pattern (-O2 -msse2):

t.c: In function ‘foo’:
t.c:12:1: error: unrecognizable insn:
(insn 10 9 11 3 (set (reg/v:V2DI 66 [ s ])
        (vec_concat:V2DI (reg:DI 71)
            (vec_select:DI (reg/v:V2DI 66 [ s ])
                (parallel [
                        (const_int 1 [0x1])
                    ])))) t.c:10 -1
     (nil))
t.c:12:1: internal compiler error: in extract_insn, at recog.c:2109

The problem is in i386.c, ix86_expand_vector_set (around line 31485), where
V2DImode goes through the same code path as V2DFmode, synthesizing
unrecognisable vec_concat/vec_select insn in invalid mode.

Reply via email to