re PR tree-optimization/70372 (ICE: in wide_int_to_tree, at tree.c:1488 with -fno-tree-fre and v2ti vectors)

2016-03-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70372
	* tree-ssa-reassoc.c (eliminate_plus_minus_pair): Use
	build_all_ones_cst to also handle vector types correctly.

	* gcc.dg/tree-ssa/pr70372.c: New testcase.

From-SVN: r234449
This commit is contained in:
Richard Biener 2016-03-24 08:17:43 +00:00 committed by Richard Biener
parent 1923c60d63
commit ce9d0c0395
4 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2016-03-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/70372
* tree-ssa-reassoc.c (eliminate_plus_minus_pair): Use
build_all_ones_cst to also handle vector types correctly.
2016-03-23 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/70381

View File

@ -1,3 +1,8 @@
2016-03-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/70372
* gcc.dg/tree-ssa/pr70372.c: New testcase.
2016-03-23 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/70347

View File

@ -0,0 +1,14 @@
/* { dg-do compile } */
/* { dg-options "-O -fno-tree-fre -w -Wno-psabi" } */
typedef unsigned v2ti __attribute__ ((vector_size (32)));
v2ti
foo (v2ti u, v2ti v)
{
u[0] >>= 0xf;
v ^= ~v;
v &= ~u;
v -= -u;
return v;
}

View File

@ -821,7 +821,7 @@ eliminate_plus_minus_pair (enum tree_code opcode,
}
ops->ordered_remove (i);
add_to_ops_vec (ops, build_int_cst_type (op_type, -1));
add_to_ops_vec (ops, build_all_ones_cst (op_type));
ops->ordered_remove (currindex);
reassociate_stats.ops_eliminated ++;