aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ifcvt.c14
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b3419b6..32875df 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2015-09-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+ PR rtl-optimization/67481
+ * ifcvt.c (contains_ccmode_rtx_p): New function.
+ (insn_valid_noce_process_p): Use it.
+
+2015-09-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
PR rtl-optimization/67456
PR rtl-optimization/67464
PR rtl-optimization/67465
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 2b63216..7ab738e 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -1761,6 +1761,19 @@ noce_try_cmove (struct noce_if_info *if_info)
return FALSE;
}
+/* Return true if X contains a conditional code mode rtx. */
+
+static bool
+contains_ccmode_rtx_p (rtx x)
+{
+ subrtx_iterator::array_type array;
+ FOR_EACH_SUBRTX (iter, array, x, ALL)
+ if (GET_MODE_CLASS (GET_MODE (*iter)) == MODE_CC)
+ return true;
+
+ return false;
+}
+
/* Helper for bb_valid_for_noce_process_p. Validate that
the rtx insn INSN is a single set that does not set
the conditional register CC and is in general valid for
@@ -1779,6 +1792,7 @@ insn_valid_noce_process_p (rtx_insn *insn, rtx cc)
/* Currently support only simple single sets in test_bb. */
if (!sset
|| !noce_operand_ok (SET_DEST (sset))
+ || contains_ccmode_rtx_p (SET_DEST (sset))
|| !noce_operand_ok (SET_SRC (sset)))
return false;