sched-deps: respect deps->readonly in macro-fusion (PR 84566)
authorAlexander Monakov <amonakov@ispras.ru>
Wed, 11 Apr 2018 14:36:04 +0000 (17:36 +0300)
committerAlexander Monakov <amonakov@gcc.gnu.org>
Wed, 11 Apr 2018 14:36:04 +0000 (17:36 +0300)
PR rtl-optimization/84566
* sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
sched_macro_fuse_insns.

From-SVN: r259322

gcc/ChangeLog
gcc/sched-deps.c

index b24df796b6a8a6219f9bf2655be93d52eb85da6c..39230d7dd55994e6c109efb7007e17201ef356c3 100644 (file)
@@ -1,3 +1,9 @@
+2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
+
+       PR rtl-optimization/84566
+       * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
+       sched_macro_fuse_insns.
+
 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
 
        PR target/84301
index 9a5cbebea4064f6af033cff430eada9710856485..120b5f0ddc17ec6c1cc9bb305cbe622a22c9bb8c 100644 (file)
@@ -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);