aarch64.c (aarch_macro_fusion_pair_p): Check prev_set and curr_set for AARCH64_FUSE_A...
authorAndrew Pinski <apinski@cavium.com>
Fri, 7 Jul 2017 22:52:12 +0000 (22:52 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Fri, 7 Jul 2017 22:52:12 +0000 (15:52 -0700)
2017-07-07  Andrew Pinski  <apinski@cavium.com>

        * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
        prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.

From-SVN: r250068

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index dbb51913ecfec52f3563a3b4146384e6bb071b89..67a827c64c806619383367b624913ff28aba99b6 100644 (file)
@@ -1,3 +1,8 @@
+2017-07-07  Andrew Pinski  <apinski@cavium.com>
+
+       * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
+       prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.
+
 2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        * config/rs6000/rs6000.c (rs6000_get_function_versions_dispatcher):
index ef1b5a8e2153eb9079a650dd8406335430c2c04a..799989a4f0929e1db504a2f36c0bad20af605ff3 100644 (file)
@@ -14324,7 +14324,9 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr)
        }
     }
 
-  if (aarch64_fusion_enabled_p (AARCH64_FUSE_ALU_BRANCH)
+  if (prev_set
+      && curr_set
+      && aarch64_fusion_enabled_p (AARCH64_FUSE_ALU_BRANCH)
       && any_condjump_p (curr))
     {
       /* We're trying to match: