Commit 0580f6a1 by Richard Biener Committed by Richard Biener

re PR tree-optimization/67859 (ICE on valid code at -O2 and -O3 on x86_64-linux-gnu)

2015-10-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/67859
	* tree-ssa-pre.c (create_expression_by_pieces): Properly
	discard not inserted stmts.

	* gcc.dg/torture/pr67859.c: New testcase.

From-SVN: r228519
parent badfb2fb
2015-10-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/67859
* tree-ssa-pre.c (create_expression_by_pieces): Properly
discard not inserted stmts.
2015-10-06 Jonathan Wakely <jwakely@redhat.com>
* doc/extend.texi (Template Instantiation): Reorder options and
2015-10-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/67859
* gcc.dg/torture/pr67859.c: New testcase.
2015-10-05 Kirill Yukhin <kirill.yukhin@intel.com>
* gcc.target/i386/builtin_target.c: Add check for AES and PCLMUL.
......
/* { dg-do compile } */
int a, b, c;
void
fn1 ()
{
b = c ? 0 : 1 << a;
b |= 0x9D7A5FD9;
for (;;)
{
int d = 1;
b &= (unsigned) d;
}
}
......@@ -2897,11 +2897,16 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
folded = gimple_convert (&forced_stmts, exprtype, folded);
/* If everything simplified to an exisiting SSA name or constant just
return that. */
if (gimple_seq_empty_p (forced_stmts)
|| is_gimple_min_invariant (folded))
/* If there is nothing to insert, return the simplified result. */
if (gimple_seq_empty_p (forced_stmts))
return folded;
/* If we simplified to a constant return it and discard eventually
built stmts. */
if (is_gimple_min_invariant (folded))
{
gimple_seq_discard (forced_stmts);
return folded;
}
gcc_assert (TREE_CODE (folded) == SSA_NAME);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment