[gcc/devel/ranger] [AArch64] Enable compare branch fusion

Aldy Hernandez aldyh@gcc.gnu.org
Wed Jun 17 18:02:48 GMT 2020


https://gcc.gnu.org/g:6ed8c923325c9b2fcb30996fa14582ac136d9329

commit 6ed8c923325c9b2fcb30996fa14582ac136d9329
Author: Wilco Dijkstra <wdijkstr@arm.com>
Date:   Fri Jan 17 14:27:14 2020 +0000

    [AArch64] Enable compare branch fusion
    
    Enable the most basic form of compare-branch fusion since various CPUs
    support it. This has no measurable effect on cores which don't support
    branch fusion, but increases fusion opportunities on cores which do.
    
    gcc/
            * config/aarch64/aarch64.c (generic_tunings): Add branch fusion.
            (neoversen1_tunings): Likewise.

Diff:
---
 gcc/ChangeLog                | 5 +++++
 gcc/config/aarch64/aarch64.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 06bcb81acc8..debd4d76a03 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2020-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
+
+	* config/aarch64/aarch64.c (generic_tunings): Add branch fusion.
+	(neoversen1_tunings): Likewise.
+
 2020-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
 
 	PR target/92692
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index ea9d6a12b12..fb2e1021182 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -726,7 +726,7 @@ static const struct tune_params generic_tunings =
   SVE_NOT_IMPLEMENTED, /* sve_width  */
   4, /* memmov_cost  */
   2, /* issue_rate  */
-  (AARCH64_FUSE_AES_AESMC), /* fusible_ops  */
+  (AARCH64_FUSE_AES_AESMC | AARCH64_FUSE_CMP_BRANCH), /* fusible_ops  */
   "16:12",	/* function_align.  */
   "4",	/* jump_align.  */
   "8",	/* loop_align.  */
@@ -1130,7 +1130,7 @@ static const struct tune_params neoversen1_tunings =
   SVE_NOT_IMPLEMENTED, /* sve_width  */
   4, /* memmov_cost  */
   3, /* issue_rate  */
-  AARCH64_FUSE_AES_AESMC, /* fusible_ops  */
+  (AARCH64_FUSE_AES_AESMC | AARCH64_FUSE_CMP_BRANCH), /* fusible_ops  */
   "32:16",	/* function_align.  */
   "32:16",	/* jump_align.  */
   "32:16",	/* loop_align.  */


More information about the Gcc-cvs mailing list