Commit 04ac4afa by Bin Cheng Committed by Bin Cheng

re PR tree-optimization/71503 (gcc ICE at -O3 on valid code on x86_64-linux-gnu…

re PR tree-optimization/71503 (gcc ICE at -O3 on valid code on x86_64-linux-gnu in "gen_phi_arg_condition")

	PR tree-optimization/71503
	PR tree-optimization/71683
	* tree-if-conv.c (gen_phi_arg_condition): Record true predicate
	and break.

	gcc/testsuite
	PR tree-optimization/71503
	PR tree-optimization/71683
	* gcc.dg/tree-ssa/ifc-pr71503.c: New test.
	* gcc.dg/tree-ssa/ifc-pr71683.c: New test.

From-SVN: r238512
parent 21f88103
2016-07-20 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/71503
PR tree-optimization/71683
* tree-if-conv.c (gen_phi_arg_condition): Record true predicate
and break.
2016-07-20 Martin Liska <mliska@suse.cz>
* doc/invoke.texi (-fipa-ra): Document when the option is
......
2016-07-20 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/71503
PR tree-optimization/71683
* gcc.dg/tree-ssa/ifc-pr71503.c: New test.
* gcc.dg/tree-ssa/ifc-pr71683.c: New test.
2016-07-20 Martin Liska <mliska@suse.cz>
* gcc.dg/plugin/plugin.exp: Remove sreal test.
......
/* { dg-do compile } */
/* { dg-options "-Ofast" { target *-*-* } } */
int a, b;
unsigned long d;
void fn1() {
unsigned long *h = &d;
line1 : {
int i = 4;
for (; b; i++) {
d = ((d + 6 ?: *h) ? a : 7) && (i &= 0 >= b);
b += a;
}
}
h = 0;
for (; *h;)
goto line1;
}
/* { dg-do compile } */
/* { dg-options "-Ofast" { target *-*-* } } */
short unsigned int ve;
void
u1 (void)
{
int oq = 0;
while (ve != 0)
{
int j4, w7 = oq;
oq = 0 / oq;
ve %= oq;
j4 = ve ^ 1;
ve ^= oq;
if (j4 != 0 ? j4 : ve)
oq = ve;
else
if (w7 != 0)
oq = ve;
}
}
......@@ -1687,7 +1687,10 @@ gen_phi_arg_condition (gphi *phi, vec<int> *occur,
e = gimple_phi_arg_edge (phi, (*occur)[i]);
c = bb_predicate (e->src);
if (is_true_predicate (c))
continue;
{
cond = c;
break;
}
c = force_gimple_operand_gsi_1 (gsi, unshare_expr (c),
is_gimple_condexpr, NULL_TREE,
true, GSI_SAME_STMT);
......
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