Commit 77e5edaf by Jan Hubicka

re PR middle-end/81030 (ICE on valid code at -O1 (only) on x86_64-linux-gnu:…

re PR middle-end/81030 (ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed)


	PR middle-end/81030
	* cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
	when gimple level profile disagrees with what RTL expander did.
	* gcc.dg/pr81030.c: New test.

From-SVN: r250383
parent 891ad31c
2017-07-18 Jan Hubicka <hubicka@ucw.cz>
Tom de Vries <tom@codesourcery.com>
PR middle-end/81030
* cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
when gimple level profile disagrees with what RTL expander did.
2017-07-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/61171
......
......@@ -673,10 +673,18 @@ find_many_sub_basic_blocks (sbitmap blocks)
&& profile_status_for_fn (cfun) != PROFILE_READ))
bb->count = profile_count::uninitialized ();
}
else
/* If nothing changed, there is no need to create new BBs. */
if (EDGE_COUNT (bb->succs) == n_succs[bb->index])
/* If nothing changed, there is no need to create new BBs. */
else if (EDGE_COUNT (bb->succs) == n_succs[bb->index])
{
/* In rare occassions RTL expansion might have mistakely assigned
a probabilities different from what is in CFG. This happens
when we try to split branch to two but optimize out the
second branch during the way. See PR81030. */
if (JUMP_P (BB_END (bb)) && any_condjump_p (BB_END (bb))
&& EDGE_COUNT (bb->succs) >= 2)
update_br_prob_note (bb);
continue;
}
compute_outgoing_frequencies (bb);
}
......
2017-07-17 Tom de Vries <tom@codesourcery.com>
PR middle-end/81030
* gcc.dg/pr81030.c: New test.
2017-07-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/61171
......
/* { dg-do compile } */
/* { dg-options "-O1" } */
void __assert_fail (const char *, const char *, unsigned int, const char *);
int a, b, c, d, e, f, h;
unsigned char g;
int main ()
{
int i, *j = &b;
if (a)
{
if (h)
{
int **k = &j;
d = 0;
*k = &e;
}
else
for (b = 0; b > -28; b = g)
;
c || !j ? : __assert_fail ("c || !j", "small.c", 20, "main");
if (f)
for (i = 0; i < 1; i++)
;
}
return 0;
}
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