[Bug tree-optimization/105049] ICE: in build_vector_from_val, at tree.cc:2119 with -O -fno-tree-forwprop
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 25 12:15:53 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105049
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:0b0fc52b0412cc1608f4f0edb8a0ab2495619c4e
commit r12-7813-g0b0fc52b0412cc1608f4f0edb8a0ab2495619c4e
Author: Richard Biener <rguenther@suse.de>
Date: Fri Mar 25 08:43:45 2022 +0100
middle-end/105049 - fix uniform_vector_p and vector CTOR gimplification
We have
return VIEW_CONVERT_EXPR<U>( VEC_PERM_EXPR < {<<< Unknown tree:
compound_literal_expr
V D.1984 = { 0 }; >>>, { 0 }} , {<<< Unknown tree:
compound_literal_expr
V D.1985 = { 0 }; >>>, { 0 }} , { 0, 0 } > & {(short int)
SAVE_EXPR <c>, (short int) SAVE_EXPR <c>});
where we gimplify the init CTORs to
_1 = {{ 0 }, { 0 }};
_2 = {{ 0 }, { 0 }};
instead of to vector constants. That later runs into a bug in
uniform_vector_p which doesn't handle CTORs of vector elements
correctly.
The following adjusts uniform_vector_p to handle CTORs of vector
elements.
2022-03-25 Richard Biener <rguenther@suse.de>
PR middle-end/105049
* tree.cc (uniform_vector_p): Recurse for VECTOR_CST or
CONSTRUCTOR first elements.
* gcc.dg/pr105049.c: New testcase.
More information about the Gcc-bugs
mailing list