When we do epilogue vectorization the partial reduction of a bool
vector via vect_create_partial_epilog ends up being done on an
integer vector but we fail to pun back to a bool vector at the end,
causing an ICE later. I couldn't manage to create a testcase
running into the failure but a pending patch will expose this on
gcc.dg/vect/vect-switch-ifcvt-3.c
* tree-vect-loop.cc (vect_create_partial_epilog): Pun back
to the requested type if necessary.
new_temp = gimple_build (seq, code, vectype1, dst1, dst2);
}
+ if (!useless_type_conversion_p (vectype, TREE_TYPE (new_temp)))
+ {
+ tree dst3 = make_ssa_name (vectype);
+ gimple *epilog_stmt = gimple_build_assign (dst3, VIEW_CONVERT_EXPR,
+ build1 (VIEW_CONVERT_EXPR,
+ vectype, new_temp));
+ gimple_seq_add_stmt_without_update (seq, epilog_stmt);
+ new_temp = dst3;
+ }
return new_temp;
}