[SPARC] Use match_test rather than eq/ne symbol_ref

Richard Sandiford rdsandiford@googlemail.com
Tue Sep 13 18:25:00 GMT 2011


As per the subject.  Tested by making sure that there were no new
warnings building sparc-linux-gnu, and that there were no changes
in the assembly output for the C and C++ testsuite.  OK to install?

Richard


gcc/
	* config/sparc/sparc.md: Use match_test rather than eq/ne symbol_ref
	throughout file.

Index: gcc/config/sparc/sparc.md
===================================================================
--- gcc/config/sparc/sparc.md	2011-09-13 18:43:39.000000000 +0100
+++ gcc/config/sparc/sparc.md	2011-09-13 19:05:10.000000000 +0100
@@ -218,10 +218,10 @@ (define_attr "length" ""
 	 (eq_attr "branch_type" "fcc")
 	   (if_then_else (match_operand 0 "fcc0_register_operand" "")
 	     (if_then_else (eq_attr "empty_delay_slot" "true")
-	       (if_then_else (eq (symbol_ref "TARGET_V9") (const_int 0))
+	       (if_then_else (not (match_test "TARGET_V9"))
 		 (const_int 3)
 		 (const_int 2))
-	       (if_then_else (eq (symbol_ref "TARGET_V9") (const_int 0))
+	       (if_then_else (not (match_test "TARGET_V9"))
 		 (const_int 2)
 		 (const_int 1)))
 	     (if_then_else (lt (pc) (match_dup 2))



More information about the Gcc-patches mailing list