mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/50902 (intVar/dinternal.cc ICEs at -O2 -ftree-vectorize)
2011-11-02 Richard Guenther <rguenther@suse.de> PR tree-optimization/50902 * tree-vect-stmts.c (vectorizable_load): Properly convert an invariant initializer element. * gcc.dg/torture/pr50902.c: New testcase. From-SVN: r180765
This commit is contained in:
parent
3164517929
commit
98f4fb344a
|
@ -1,3 +1,9 @@
|
||||||
|
2011-11-02 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/50902
|
||||||
|
* tree-vect-stmts.c (vectorizable_load): Properly convert
|
||||||
|
an invariant initializer element.
|
||||||
|
|
||||||
2010-11-02 Richard Guenther <rguenther@suse.de>
|
2010-11-02 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/50890
|
PR tree-optimization/50890
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2011-11-02 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/50902
|
||||||
|
* gcc.dg/torture/pr50902.c: New testcase.
|
||||||
|
|
||||||
2010-11-02 Richard Guenther <rguenther@suse.de>
|
2010-11-02 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/50890
|
PR tree-optimization/50890
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
|
||||||
|
_Bool data[128];
|
||||||
|
void foo (_Bool *init)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < 128; i++)
|
||||||
|
data[i] = *init;
|
||||||
|
}
|
|
@ -4726,11 +4726,20 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
|
||||||
/* 4. Handle invariant-load. */
|
/* 4. Handle invariant-load. */
|
||||||
if (inv_p && !bb_vinfo)
|
if (inv_p && !bb_vinfo)
|
||||||
{
|
{
|
||||||
tree vec_inv;
|
tree tem, vec_inv;
|
||||||
gimple_stmt_iterator gsi2 = *gsi;
|
gimple_stmt_iterator gsi2 = *gsi;
|
||||||
gcc_assert (!strided_load);
|
gcc_assert (!strided_load);
|
||||||
gsi_next (&gsi2);
|
gsi_next (&gsi2);
|
||||||
vec_inv = build_vector_from_val (vectype, scalar_dest);
|
tem = scalar_dest;
|
||||||
|
if (!useless_type_conversion_p (TREE_TYPE (vectype),
|
||||||
|
TREE_TYPE (tem)))
|
||||||
|
{
|
||||||
|
tem = fold_convert (TREE_TYPE (vectype), tem);
|
||||||
|
tem = force_gimple_operand_gsi (&gsi2, tem, true,
|
||||||
|
NULL_TREE, true,
|
||||||
|
GSI_SAME_STMT);
|
||||||
|
}
|
||||||
|
vec_inv = build_vector_from_val (vectype, tem);
|
||||||
new_temp = vect_init_vector (stmt, vec_inv,
|
new_temp = vect_init_vector (stmt, vec_inv,
|
||||||
vectype, &gsi2);
|
vectype, &gsi2);
|
||||||
new_stmt = SSA_NAME_DEF_STMT (new_temp);
|
new_stmt = SSA_NAME_DEF_STMT (new_temp);
|
||||||
|
|
Loading…
Reference in New Issue