From 63835b875518278bd9329fbc2c0da6ed26992173 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 21 Aug 1995 13:29:41 -0400 Subject: [PATCH] (decrement_and_branch_until_zero): Use arithmetic_comparison_operator to decide... (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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 8d50e890f42..ff0119631cb 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -4910,6 +4910,9 @@ 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" "") @@ -4925,7 +4928,7 @@ (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)]) @@ -4952,7 +4955,7 @@ (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)]) -- 2.30.2