]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sparc: Use match_code in zero_or_v7_operand.
authorRichard Henderson <rth@redhat.com>
Tue, 24 Jan 2012 17:44:15 +0000 (09:44 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 24 Jan 2012 17:44:15 +0000 (09:44 -0800)
Failure to do so means that genpreds doesn't know that we're
matching a const_int, and it generates the wrong mode test.

        * config/sparc/predicates.md (zero_or_v7_operand): Use match_code.

From-SVN: r183481

gcc/ChangeLog
gcc/config/sparc/predicates.md

index 4197c182ed47628d1d3941fcd047cd32276c64a3..c06613e493062226769751aa403e3824c7dda0df 100644 (file)
@@ -1,3 +1,7 @@
+2012-01-25  Richard Henderson  <rth@redhat.com>
+
+       * config/sparc/predicates.md (zero_or_v7_operand): Use match_code.
+
 2012-01-25  Richard Henderson  <rth@redhat.com>
 
        PR target/51968
index 81e5320649846a793bf6458b0fcd57817b55224a..308fbd6bb74183a2d52b19a72351e5bb08809436 100644 (file)
@@ -1,5 +1,5 @@
 ;; Predicate definitions for SPARC.
-;; Copyright (C) 2005, 2007, 2008, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007, 2008, 2010, 2012 Free Software Foundation, Inc.
 ;;
 ;; This file is part of GCC.
 ;;
 
 ;; Return true if OP is Zero, or if the target is V7.
 (define_predicate "zero_or_v7_operand"
-  (ior (match_test "op == const0_rtx")
-       (match_test "!TARGET_V8 && !TARGET_V9")))
+  (and (match_code "const_int")
+       (ior (match_test "INTVAL (op) == 0")
+           (match_test "!TARGET_V8 && !TARGET_V9"))))
 
 ;; Predicates for symbolic constants.