https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91623
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Marc Glisse from comment #6) > For the missed constant folding, it seems that we end up in fold_vec_perm, > with type a vector of "long long", while arg0 and arg1 are vectors of > "long", and we give up because of the early check "TREE_TYPE (TREE_TYPE > (arg0)) != TREE_TYPE (type)". I don't know if the check should be relaxed, > or if the bug is earlier and we shouldn't have reached this place with such > different types... It's GENERIC type restrictions vs. GIMPLE ones and folding should be relaxed here.