Commit e66f219b by Jeff Law Committed by Jeff Law

re PR tree-optimization/70005 (wrong code at -O2 and -O3 on x86_64-linux-gnu)

	PR tree-optimization/70005
	* tree-ssa-uncprop.c (associate_equivalences_with_edges): Handle case
	where an object with a boolean range is compared against a value
	outside [0..1].

	PR tree-optimization/70005
	* gcc.c-torture/execute/pr70005.c New test.

From-SVN: r233829
parent 0c6072a3
2016-02-28 Jeff Law <law@redhat.com>
PR tree-optimization/70005
* tree-ssa-uncprop.c (associate_equivalences_with_edges): Handle case
where an object with a boolean range is compared against a value
outside [0..1].
PR tree-optimization/69999
* gimple-ssa-split-paths.c (split_paths): When duplicating a block
with an outgoing edge marked with EDGE_IRREDUCIBLE_LOOP, schedule
......
2016-02-29 Jeff Law <law@redhat.com>
PR tree-optimization/70005
* gcc.c-torture/execute/pr70005.c New test.
PR tree-optimization/69999
* gcc.c-torture/compile/pr69999.c: New test.
......
unsigned char a = 6;
int b, c;
static void
fn1 ()
{
int i = a > 1 ? 1 : a, j = 6 & (c = a && (b = a));
int d = 0, e = a, f = ~c, g = b || a;
unsigned char h = ~a;
if (a)
f = j;
if (h && g)
d = a;
i = -~(f * d * h) + c && (e || i) ^ f;
if (i != 1)
__builtin_abort ();
}
int
main ()
{
fn1 ();
return 0;
}
......@@ -95,7 +95,8 @@ associate_equivalences_with_edges (void)
if (TREE_CODE (op0) == SSA_NAME
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op0)
&& ssa_name_has_boolean_range (op0)
&& is_gimple_min_invariant (op1))
&& is_gimple_min_invariant (op1)
&& (integer_zerop (op1) || integer_onep (op1)))
{
tree true_val = constant_boolean_node (true, TREE_TYPE (op0));
tree false_val = constant_boolean_node (false,
......
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