diff mbox

[3/4] Add a branch cost for SPARC M7.

Message ID 1495049778-20262-4-git-send-email-sheldon.lobo@oracle.com
State New
Headers show

Commit Message

Sheldon Lobo May 17, 2017, 7:36 p.m. UTC
* config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
	latency to 1.
---
 gcc/config/sparc/sparc.h |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 6277738..686a3d5 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -1568,7 +1568,8 @@  do {									   \
    On Niagara-2 and Niagara-3, a not-taken branch costs 1 cycle whereas
    a taken branch costs 6 cycles.
 
-   The T4 Supplement specifies the branch latency at 2 cycles. */
+   The T4 Supplement specifies the branch latency at 2 cycles.
+   The M7 Supplement specifies the branch latency at 1 cycle. */
 
 #define BRANCH_COST(speed_p, predictable_p) \
 	((sparc_cpu == PROCESSOR_V9 \
@@ -1583,7 +1584,9 @@  do {									   \
 	    ? 5 \
 	 : (sparc_cpu == PROCESSOR_NIAGARA4 \
 	    ? 2 \
-	 : 3)))))
+	 : (sparc_cpu == PROCESSOR_NIAGARA7 \
+	    ? 1 \
+	 : 3))))))
 
 /* Control the assembler format that we output.  */