http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58314
--- Comment #12 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Oleg Endo from comment #10) > > FAIL: gcc.dg/torture/vshuf-v16hi.c -O2 (test for excess errors) > Excess errors: > /usr/local/sh-elf/bin/ld: internal error: merge of architecture 'sh3e' with > architecture 'sh2a-nofpu' produced unknown architecture > /usr/local/sh-elf/bin/ld: /tmp/ccRPtSqs.o: uses instructions which are > incompatible with instructions used in previous modules > /usr/local/sh-elf/bin/ld: failed to merge target specific data of file > /tmp/ccRPtSqs.o Below is the reduced test case that fails when compiled with -O2 -m4 -mb when the r,r constraints are allowed in the "*movhi" pattern and the "*mov<mode>_reg_reg" pattern is disabled. So the comment above the "*mov<mode>_reg_reg" pattern is still correct. typedef unsigned short V __attribute__((vector_size(32))); typedef V VI; extern void abort (void); V a, b, c, d; __attribute__((noinline, noclone)) void test_14 (void) { VI mask = { 25, 5, 17, 1, 9, 15, 21, 7, 28, 2, 18, 13, 30, 14, 10, 4 }; int i; c = __builtin_shuffle (a, mask); d = __builtin_shuffle (a, b, mask); __asm ("" : : "r" (&c), "r" (&d) : "memory"); for (i = 0; i < 16; ++i) if (c[i] != a[mask[i] & (16 - 1)]) abort (); else if ((mask[i] & 16)) { if (d[i] != b[mask[i] & (16 - 1)]) abort (); } else if (d[i] != a[mask[i] & (16 - 1)]) abort (); }