mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/71483 (g++ ICE at -O3 on valid code on x86_64-linux-gnu with “Floating point exception”)
2016-06-15 Alan Hayward <alan.hayward@arm.com> gcc/ PR tree-optimization/71483 * tree-vect-loop.c (vectorizable_live_operation): Pick correct index for slp testsuite/ PR tree-optimization/71483 * g++.dg/vect/pr71483.c: New From-SVN: r237483
This commit is contained in:
parent
b8911cb870
commit
8dc3571219
|
|
@ -1,3 +1,9 @@
|
||||||
|
2016-06-15 Alan Hayward <alan.hayward@arm.com>
|
||||||
|
|
||||||
|
PR tree-optimization/71483
|
||||||
|
* tree-vect-loop.c (vectorizable_live_operation): Pick correct index
|
||||||
|
for slp
|
||||||
|
|
||||||
2016-06-15 Martin Liska <mliska@suse.cz>
|
2016-06-15 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
* predict.c (tree_predict_by_opcode): Call predict_edge_def
|
* predict.c (tree_predict_by_opcode): Call predict_edge_def
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2016-06-15 Alan Hayward <alan.hayward@arm.com>
|
||||||
|
|
||||||
|
PR tree-optimization/71483
|
||||||
|
* g++.dg/vect/pr71483.c: New
|
||||||
|
|
||||||
2016-06-15 Paolo Carlini <paolo.carlini@oracle.com>
|
2016-06-15 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
PR c++/70202
|
PR c++/70202
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
int b, c, d;
|
||||||
|
short *e;
|
||||||
|
void fn1() {
|
||||||
|
for (; b; b--) {
|
||||||
|
d = *e >> 2;
|
||||||
|
*e++ = d;
|
||||||
|
c = *e;
|
||||||
|
*e++ = d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6368,24 +6368,20 @@ vectorizable_live_operation (gimple *stmt,
|
||||||
|
|
||||||
int num_scalar = SLP_TREE_SCALAR_STMTS (slp_node).length ();
|
int num_scalar = SLP_TREE_SCALAR_STMTS (slp_node).length ();
|
||||||
int num_vec = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
|
int num_vec = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
|
||||||
int scalar_per_vec = num_scalar / num_vec;
|
|
||||||
|
|
||||||
/* There are three possibilites here:
|
/* Get the last occurrence of the scalar index from the concatenation of
|
||||||
1: All scalar stmts fit in a single vector.
|
all the slp vectors. Calculate which slp vector it is and the index
|
||||||
2: All scalar stmts fit multiple times into a single vector.
|
within. */
|
||||||
We must choose the last occurence of stmt in the vector.
|
int pos = (num_vec * nunits) - num_scalar + slp_index;
|
||||||
3: Scalar stmts are split across multiple vectors.
|
int vec_entry = pos / nunits;
|
||||||
We must choose the correct vector and mod the lane accordingly. */
|
int vec_index = pos % nunits;
|
||||||
|
|
||||||
/* Get the correct slp vectorized stmt. */
|
/* Get the correct slp vectorized stmt. */
|
||||||
int vec_entry = slp_index / scalar_per_vec;
|
|
||||||
vec_lhs = gimple_get_lhs (SLP_TREE_VEC_STMTS (slp_node)[vec_entry]);
|
vec_lhs = gimple_get_lhs (SLP_TREE_VEC_STMTS (slp_node)[vec_entry]);
|
||||||
|
|
||||||
/* Get entry to use. */
|
/* Get entry to use. */
|
||||||
bitstart = build_int_cst (unsigned_type_node,
|
bitstart = build_int_cst (unsigned_type_node, vec_index);
|
||||||
scalar_per_vec - (slp_index % scalar_per_vec));
|
|
||||||
bitstart = int_const_binop (MULT_EXPR, bitsize, bitstart);
|
bitstart = int_const_binop (MULT_EXPR, bitsize, bitstart);
|
||||||
bitstart = int_const_binop (MINUS_EXPR, vec_bitsize, bitstart);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue