OSDN Git Service

(divsi3): Fix divide by 2^N with compare RTL.
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Jun 1994 00:40:39 +0000 (00:40 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Jun 1994 00:40:39 +0000 (00:40 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7498 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/rs6000/rs6000.md

index 3bff980..ee9b8d6 100644 (file)
 
 (define_insn ""
   [(set (match_operand:CC 0 "cc_reg_operand" "=x")
-       (div:SI (match_operand:SI 1 "gpc_reg_operand" "r")
-               (match_operand:SI 2 "const_int_operand" "N")))
+       (compare:CC (div:SI (match_operand:SI 1 "gpc_reg_operand" "r")
+                           (match_operand:SI 2 "const_int_operand" "N"))
+                   (const_int 0)))
    (clobber (match_scratch:SI 3 "=r"))]
   "exact_log2 (INTVAL (operands[2])) >= 0"
   "{srai|srawi} %3,%1,%p2\;{aze.|addze.} %3,%3"
 
 (define_insn ""
   [(set (match_operand:CC 3 "cc_reg_operand" "=x")
-       (div:SI (match_operand:SI 1 "gpc_reg_operand" "r")
-               (match_operand:SI 2 "const_int_operand" "N")))
+       (compare:CC (div:SI (match_operand:SI 1 "gpc_reg_operand" "r")
+                           (match_operand:SI 2 "const_int_operand" "N"))
+                   (const_int 0)))
    (set (match_operand:SI 0 "gpc_reg_operand" "=r")
        (div:SI (match_dup 1) (match_dup 2)))]
   "exact_log2 (INTVAL (operands[2])) >= 0"