diff options
author | H.J. Lu <hjl@gcc.gnu.org> | 2008-09-25 16:44:57 -0700 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2008-09-25 16:44:57 -0700 |
commit | 6396547e62404f1a4965a61dd5c87258cda2be2c (patch) | |
tree | d82213a5409bf991ef8839f8fa82d55fca8a68ff /gcc | |
parent | 548a20809c652120304d3b2d2119b8b6c88f35a7 (diff) | |
download | gcc-6396547e62404f1a4965a61dd5c87258cda2be2c.zip gcc-6396547e62404f1a4965a61dd5c87258cda2be2c.tar.gz gcc-6396547e62404f1a4965a61dd5c87258cda2be2c.tar.bz2 |
i386.md: Check cmp/branch fuse for cmp peephole optimization.
2008-09-25 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.md: Check cmp/branch fuse for cmp peephole
optimization.
From-SVN: r140673
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | 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 <hongjiu.lu@intel.com> + + * config/i386/i386.md: Check cmp/branch fuse for cmp peephole + optimization. + 2008-09-25 Richard Sandiford <rdsandiford@googlemail.com> * combine.c (make_compound_operation): Handle the 'E' format. @@ -11,7 +16,7 @@ 2008-09-25 Sergei Dyshel <sergeid@il.ibm.com> - * matrix-reorg.c (transform_allocation_sites): Initializers + * matrix-reorg.c (transform_allocation_sites): Initializers added to avoid the warning. 2008-09-25 Martin Jambor <mjambor@suse.cz> 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) |