From: H.J. Lu Date: Thu, 25 Sep 2008 23:44:57 +0000 (-0700) Subject: i386.md: Check cmp/branch fuse for cmp peephole optimization. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6396547e62404f1a4965a61dd5c87258cda2be2c;p=platform%2Fupstream%2Fgcc.git i386.md: Check cmp/branch fuse for cmp peephole optimization. 2008-09-25 H.J. Lu * config/i386/i386.md: Check cmp/branch fuse for cmp peephole optimization. From-SVN: r140673 --- 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)