diff options
author | Martin Jambor <mjambor@suse.cz> | 2012-08-31 14:05:45 +0000 |
---|---|---|
committer | Martin Jambor <mjambor@suse.cz> | 2012-08-31 14:05:45 +0000 |
commit | 3af51a55c06690e999d5cde5781b7b2d4886803d (patch) | |
tree | 602afe45f5e892491199bff66bc6cf3c3be7a5f6 /gcc/ipa-inline-analysis.c | |
parent | 4abdff8894a1657b43d3b2ddfe198e125427c33a (diff) |
2012-08-31 Martin Jambor <mjambor@suse.cz>
PR middle-end/54409
* ipa-inline-analysis.c (remap_predicate): Fix the offset_map
checking condition.
* gcc/testsuite/gcc.dg/torture/pr54409.c: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190833 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r-- | gcc/ipa-inline-analysis.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index 6da256a614c..5b31b6d8c60 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -2811,8 +2811,11 @@ remap_predicate (struct inline_summary *info, if (!operand_map || (int)VEC_length (int, operand_map) <= c->operand_num || VEC_index (int, operand_map, c->operand_num) == -1 - || (!c->agg_contents - && VEC_index (int, offset_map, c->operand_num) != 0) + /* TODO: For non-aggregate conditions, adding an offset is + basically an arithmetic jump function processing which + we should support in future. */ + || ((!c->agg_contents || !c->by_ref) + && VEC_index (int, offset_map, c->operand_num) > 0) || (c->agg_contents && c->by_ref && VEC_index (int, offset_map, c->operand_num) < 0)) cond_predicate = true_predicate (); |