aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-split.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-12-10 09:05:58 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-12-10 09:05:58 +0000
commitd4f4e71c84fc7bcf21f45e315a07b1408f514f75 (patch)
tree603382ded20cccc1a98ac7e6042bf71bb95e2a78 /gcc/ipa-split.c
parent77ad31753c0440c4141e957edee243f739570587 (diff)
downloadgcc-d4f4e71c84fc7bcf21f45e315a07b1408f514f75.zip
gcc-d4f4e71c84fc7bcf21f45e315a07b1408f514f75.tar.gz
gcc-d4f4e71c84fc7bcf21f45e315a07b1408f514f75.tar.bz2
re PR ipa/68721 (wrong code at -Os and above on x86_64-linux-gnu)
2015-12-10 Richard Biener <rguenther@suse.de> PR ipa/68721 * ipa-split.c (split_function): Record return value properly when the split part doesn't set it. * gcc.dg/torture/pr68721.c: New testcase. From-SVN: r231494
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r--gcc/ipa-split.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index 56c954b..f77ab52 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -1281,7 +1281,7 @@ split_function (basic_block return_bb, struct split_point *split_point,
to return void instead of just outputting function with undefined return
value. For structures this affects quality of codegen. */
else if (!split_point->split_part_set_retval
- && find_retval (return_bb))
+ && (retval = find_retval (return_bb)))
{
bool redirected = true;
basic_block new_return_bb = create_basic_block (NULL, 0, return_bb);
@@ -1305,6 +1305,7 @@ split_function (basic_block return_bb, struct split_point *split_point,
e->count = new_return_bb->count;
add_bb_to_loop (new_return_bb, current_loops->tree_root);
bitmap_set_bit (split_point->split_bbs, new_return_bb->index);
+ retbnd = find_retbnd (return_bb);
}
/* When we pass around the value, use existing return block. */
else