diff mbox

[Committed/AARCH64] Fix ICE with -mcpu=thunderx2t99

Message ID CA+=Sn1=DCevLdqMBiMHaMGZ9tu7u_tJvahU3KEeNaFhNZnAjnw@mail.gmail.com
State New
Headers show

Commit Message

Andrew Pinski July 7, 2017, 10:52 p.m. UTC
Hi,
  After https://gcc.gnu.org/ml/gcc-cvs/2017-06/msg01066.html, there
was many crashes with -mcpu=thunderx2t99.  This patch fixes the
crashes.

Committed after bootstrap and test.

Thanks,
Andrew Pinski

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

Patch

Index: config/aarch64/aarch64.c
===================================================================
--- config/aarch64/aarch64.c	(revision 250059)
+++ config/aarch64/aarch64.c	(working copy)
@@ -14324,7 +14324,9 @@ 
 	}
     }
 
-  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: