(decrement_and_branch_until_zero): Use arithmetic_comparison_operator to decide...
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 21 Aug 1995 17:29:41 +0000 (13:29 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 21 Aug 1995 17:29:41 +0000 (13:29 -0400)
(decrement_and_branch_until_zero): Use arithmetic_comparison_operator
to decide if there is comparison suitable to be expressed by condition
code from an arithmetic op.

From-SVN: r10269

gcc/config/i386/i386.md

index 8d50e890f424f85f9a0fd343b2c895df33c72a05..ff0119631cb44cfe3f67b10e5945a41fa2c9a7ef 100644 (file)
   return AS1 (jmp,%*%0);
 }")
 
+;; ??? could transform while(--i > 0) S; to if (--i > 0) do S; while(--i);
+;;     if S does not change i
+
 (define_expand "decrement_and_branch_until_zero"
   [(parallel [(set (pc)
                   (if_then_else (ge (plus:SI (match_operand:SI 0 "general_operand" "")
 
 (define_insn ""
   [(set (pc)
-       (if_then_else (match_operator 0 "comparison_operator"
+       (if_then_else (match_operator 0 "arithmetic_comparison_operator"
                                      [(plus:SI (match_operand:SI 1 "general_operand" "+r,m")
                                                (match_operand:SI 2 "general_operand" "rmi,ri"))
                                       (const_int 0)])
 
 (define_insn ""
   [(set (pc)
-       (if_then_else (match_operator 0 "comparison_operator"
+       (if_then_else (match_operator 0 "arithmetic_comparison_operator"
                                      [(minus:SI (match_operand:SI 1 "general_operand" "+r,m")
                                                 (match_operand:SI 2 "general_operand" "rmi,ri"))
                                       (const_int 0)])