https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118795
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Richard Biener from comment #11) > (In reply to Jakub Jelinek from comment #10) > > typedef unsigned char V __attribute__((vector_size (16))); > > > > V > > foo (V x) > > { > > return __builtin_shuffle (x, x, (V) { 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, > > 12, 12, 12, 12 }); > > } > > compiles fine. > > Yes, that's lowered then. I suspect sth post veclower introduces this > (folding, forwprop). Shows up after FRE5 which does Value numbering stmt = _242 = VEC_PERM_EXPR <_226, _240, { 0, 1, 16, 17, 2, 3, 18, 19, 4, 5, 20, 21, 6, 7, 22, 23 }>; Applying pattern match.pd:11067, gimple-match-6.cc:23482 Applying pattern match.pd:11067, gimple-match-6.cc:23482 Applying pattern match.pd:11285, gimple-match-6.cc:23983 Applying pattern match.pd:11067, gimple-match-6.cc:23482 Applying pattern match.pd:11067, gimple-match-6.cc:23482 Applying pattern match.pd:11067, generic-match-9.cc:11623 Setting value number of _242 to _242 (changed) Applying pattern match.pd:11067, gimple-match-6.cc:23482 Applying pattern match.pd:5352, gimple-match-9.cc:7744 Applying pattern match.pd:11152, gimple-match-6.cc:23690 Applying pattern match.pd:11067, gimple-match-6.cc:23482 Applying pattern match.pd:5352, gimple-match-9.cc:7744 Applying pattern match.pd:11152, gimple-match-6.cc:23690 Applying pattern match.pd:5352, gimple-match-9.cc:7744 Applying pattern match.pd:11152, gimple-match-6.cc:23690 Applying pattern match.pd:11067, gimple-match-6.cc:23482 gimple_simplified to _257 = VEC_PERM_EXPR <vect__13.7476_216, vect__13.7476_216, { 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12 }>; possibly some intermediate state fools the match.pd logic that formerly unsupported permutes are OK to be transformed into unsupported permutes. I'll wait for the reduced testcase before investigating in more detail.