This reverts commit
4c3231302577445417715a7c22e879e4159376d3.
gcc/ChangeLog:
Revert:
* tree-ssa-forwprop.cc (simplify_permutation): Use lhs type
instead of TREE_TYPE (arg0) as result type in folding VEC_PERM_EXPR.
/* Shuffle of a constructor. */
bool ret = false;
- tree res_type = TREE_TYPE (gimple_assign_lhs (stmt));
+ tree res_type = TREE_TYPE (arg0);
tree opt = fold_ternary (VEC_PERM_EXPR, res_type, arg0, arg1, op2);
if (!opt
|| (TREE_CODE (opt) != CONSTRUCTOR && TREE_CODE (opt) != VECTOR_CST))