https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43147
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Marc Glisse from comment #6) > Created attachment 45303 [details] > example patch (untested) > > Making the meaning of shuffles visible in GIMPLE could help a bit (although > it wouldn't solve the problem completely because IIRC we don't dare combine > shuffles, since it is hard to find an optimal expansion for a shuffle and we > might pessimize some cases). > This patch is one simple way to make _mm_shuffle_pd less opaque. > _mm_shuffle_ps would be a bit longer but still manageable. It has the > drawback that it does not diagnose when the mask is not a constant, or not > between 0 and 3, and I am not sure how to do that from the C code. An > alternative would be to keep the current builtin but turn it into a > vec_perm_expr in ix86_gimple_fold_builtin, which could include diagnostics. I think doing it in ix86_gimple_fold_builtin is better.