aboutsummaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-02-01 21:37:49 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-02-01 21:37:49 +0100
commit800cb72aae9947e6496c3705986c421978b92e8e (patch)
tree81322b877a3c30b2953e65d95c1c9be63e35bf9b /gcc/ifcvt.c
parent9a7013f8afa2e323ab03af7067b891076e4651f8 (diff)
downloadgcc-800cb72aae9947e6496c3705986c421978b92e8e.zip
gcc-800cb72aae9947e6496c3705986c421978b92e8e.tar.gz
gcc-800cb72aae9947e6496c3705986c421978b92e8e.tar.bz2
ifcvt.c (bb_ok_for_noce_convert_multiple_sets): Return false when count is incremented above limit...
* ifcvt.c (bb_ok_for_noce_convert_multiple_sets): Return false when count is incremented above limit, don't analyze further insns afterwards. From-SVN: r233050
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 53cb41f..a50e33d 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;
}