From: Alexander Monakov Date: Wed, 11 Apr 2018 14:36:04 +0000 (+0300) Subject: sched-deps: respect deps->readonly in macro-fusion (PR 84566) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c391bd50824e79a4639490952e08f5f98fb0029a;p=gcc.git sched-deps: respect deps->readonly in macro-fusion (PR 84566) PR rtl-optimization/84566 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking sched_macro_fuse_insns. From-SVN: r259322 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b24df796b6a..39230d7dd55 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-04-11 Alexander Monakov + + PR rtl-optimization/84566 + * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking + sched_macro_fuse_insns. + 2018-04-11 Alexander Monakov PR target/84301 diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 9a5cbebea40..120b5f0ddc1 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -2897,7 +2897,8 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx_insn *insn) && code == SET); /* Group compare and branch insns for macro-fusion. */ - if (targetm.sched.macro_fusion_p + if (!deps->readonly + && targetm.sched.macro_fusion_p && targetm.sched.macro_fusion_p ()) sched_macro_fuse_insns (insn);