From 99ebeab133265276d413f49943b55e6ff723028f Mon Sep 17 00:00:00 2001 From: hjl Date: Thu, 25 Sep 2008 23:44:57 +0000 Subject: [PATCH] 2008-09-25 H.J. Lu * config/i386/i386.md: Check cmp/branch fuse for cmp peephole optimization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140673 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 ++++++- gcc/config/i386/i386.md | 9 +++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0515819..aa42f0b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-09-25 H.J. Lu + + * config/i386/i386.md: Check cmp/branch fuse for cmp peephole + optimization. + 2008-09-25 Richard Sandiford * combine.c (make_compound_operation): Handle the 'E' format. @@ -11,7 +16,7 @@ 2008-09-25 Sergei Dyshel - * matrix-reorg.c (transform_allocation_sites): Initializers + * matrix-reorg.c (transform_allocation_sites): Initializers added to avoid the warning. 2008-09-25 Martin Jambor diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index de58df3..c6fba67 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -20966,15 +20966,16 @@ "") ;; Convert compares with 1 to shorter inc/dec operations when CF is not -;; required and register dies. Similarly for 128 to plus -128. +;; required and register dies. Similarly for 128 to -128. (define_peephole2 [(set (match_operand 0 "flags_reg_operand" "") (match_operator 1 "compare_operator" [(match_operand 2 "register_operand" "") (match_operand 3 "const_int_operand" "")]))] - "(INTVAL (operands[3]) == -1 - || INTVAL (operands[3]) == 1 - || INTVAL (operands[3]) == 128) + "(((!TARGET_FUSE_CMP_AND_BRANCH || optimize_size) + && incdec_operand (operands[3], GET_MODE (operands[3]))) + || (!TARGET_FUSE_CMP_AND_BRANCH + && INTVAL (operands[3]) == 128)) && ix86_match_ccmode (insn, CCGCmode) && peep2_reg_dead_p (1, operands[2])" [(parallel [(set (match_dup 0) -- 2.7.4