diff mbox

[PING] Move the check for any_condjump_p from sched-deps to target macros

Message ID VI1PR0802MB2621A0766927C50FBBE1FAE6831E0@VI1PR0802MB2621.eurprd08.prod.outlook.com
State New
Headers show

Commit Message

Wilco Dijkstra April 25, 2017, 11:27 a.m. UTC
Hi Naveen, 

> https://gcc.gnu.org/ml/gcc-patches/2017-03/msg01368.html

This looks good to me - I have just one comment:


The way aarch_macro_fusion_pair_p works is to return true if fusion is possible but fallthrough
if not so other, less likely, fusion candidates can still be tried.

Wilco
diff mbox

Patch

--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -13972,6 +13972,15 @@  aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr)
     {
       enum attr_type prev_type = get_attr_type (prev);
 
+      unsigned int condreg1, condreg2;
+      rtx cc_reg_1;
+      aarch64_fixed_condition_code_regs (&condreg1, &condreg2);
+      cc_reg_1 = gen_rtx_REG (CCmode, condreg1);
+      if (!reg_referenced_p (cc_reg_1, PATTERN (curr))
+	  || !prev
+	  || !modified_in_p (cc_reg_1, prev))
+	return false;
+

The return false seems incorrect - it means a core can either have FUSE_CMP_BRANCH or
FUSE_ALU_BRANCH but not both.