diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-02-01 20:37:49 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2016-02-01 20:37:49 +0000 |
commit | 61edb3263a98296a17bcb5c88f08f64c629991af (patch) | |
tree | 81322b877a3c30b2953e65d95c1c9be63e35bf9b | |
parent | 755c06072f77317ecd701744dd262c7c808f7697 (diff) |
* ifcvt.c (bb_ok_for_noce_convert_multiple_sets): Return false
when count is incremented above limit, don't analyze further
insns afterwards.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@233050 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ifcvt.c | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b3524271d58..a551069a23e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2016-02-01 Jakub Jelinek <jakub@redhat.com> + * ifcvt.c (bb_ok_for_noce_convert_multiple_sets): Return false + when count is incremented above limit, don't analyze further + insns afterwards. + * omp-low.c (oacc_parse_default_dims): Avoid -Wsign-compare warning, make sure value fits into int rather than just unsigned int. diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 53cb41f1ffa..a50e33dc66c 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -3286,15 +3286,13 @@ bb_ok_for_noce_convert_multiple_sets (basic_block test_bb, if (!can_conditionally_move_p (GET_MODE (dest))) return false; - ++count; + /* FORNOW: Our cost model is a count of the number of instructions we + would if-convert. This is suboptimal, and should be improved as part + of a wider rework of branch_cost. */ + if (++count > limit) + return false; } - /* FORNOW: Our cost model is a count of the number of instructions we - would if-convert. This is suboptimal, and should be improved as part - of a wider rework of branch_cost. */ - if (count > limit) - return false; - return count > 1; } |