From c391bd50824e79a4639490952e08f5f98fb0029a Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Wed, 11 Apr 2018 17:36:04 +0300 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/sched-deps.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) 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); -- 2.30.2