(orcc peephole): Don't allow FP regs to match pattern.
authorJim Wilson <wilson@gcc.gnu.org>
Mon, 28 Sep 1992 21:16:10 +0000 (14:16 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Mon, 28 Sep 1992 21:16:10 +0000 (14:16 -0700)
From-SVN: r2274

gcc/config/sparc/sparc.md

index 034d6ea5ac26a35e64cb7085eb7da94103fa44a8..e516fd6bae0dc1c549ae62c14db843383afdb296 100644 (file)
   "std %3,%2")
  
 ;; Optimize the case of following a reg-reg move with a test
-;; of reg just moved.
+;; of reg just moved.  Don't allow floating point regs for operand 1.
+;; This can result from a float to fix conversion.
 
 (define_peephole
   [(set (match_operand:SI 0 "register_operand" "=r")
    (set (reg:CC 0)
        (compare:CC (match_operand:SI 2 "register_operand" "r")
                    (const_int 0)))]
-  "rtx_equal_p (operands[2], operands[0])
-   || rtx_equal_p (operands[2], operands[1])"
+  "(rtx_equal_p (operands[2], operands[0])
+    || rtx_equal_p (operands[2], operands[1]))
+   && ! FP_REG_P (operands[1])"
   "orcc %1,%%g0,%0")
 
 ;; Do {sign,zero}-extended compares somewhat more efficiently.