diff options
author | Rodney Brown <rbrown64@csc.com.au> | 2002-07-17 01:36:36 +0000 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-07-16 18:36:36 -0700 |
commit | 06ec023fb9bbf0f8e1a9bb91aac4ec8227566f10 (patch) | |
tree | cdd3e8b135a3b0c565f29f246081c5a44763d201 | |
parent | 2aa9948d9b49198538c03a79d77f0aba7d88a504 (diff) | |
download | gcc-06ec023fb9bbf0f8e1a9bb91aac4ec8227566f10.zip gcc-06ec023fb9bbf0f8e1a9bb91aac4ec8227566f10.tar.gz gcc-06ec023fb9bbf0f8e1a9bb91aac4ec8227566f10.tar.bz2 |
i386.c (ix86_expand_int_movcc): In the case where the comparison directly gives a mask suppress addition when...
* config/i386/i386.c (ix86_expand_int_movcc): In the case where
the comparison directly gives a mask suppress addition when cf is
zero by complementing the mask.
From-SVN: r55505
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 12 |
2 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f6418d..a851ef29 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-07-16 Rodney Brown <rbrown64@csc.com.au> + + * config/i386/i386.c (ix86_expand_int_movcc): In the case where + the comparison directly gives a mask suppress addition when cf is + zero by complementing the mask. + 2002-07-16 Nathanael Nerode <neroden@gcc.gnu.org> * Makefile.in: Delete references to enquire. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 6e19b5c..6c2a2b5 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -8666,7 +8666,6 @@ ix86_expand_int_movcc (operands) if ((compare_code == LTU || compare_code == GEU) && !second_test && !bypass_test) { - /* Detect overlap between destination and compare sources. */ rtx tmp = out; @@ -8723,7 +8722,7 @@ ix86_expand_int_movcc (operands) /* * cmpl op0,op1 * sbbl dest,dest - * xorl $-1, dest + * notl dest * [addl dest, cf] * * Size 8 - 11. @@ -8739,11 +8738,20 @@ ix86_expand_int_movcc (operands) /* * cmpl op0,op1 * sbbl dest,dest + * [notl dest] * andl cf - ct, dest * [addl dest, ct] * * Size 8 - 11. */ + + if (cf == 0) + { + cf = ct; + ct = 0; + tmp = expand_simple_unop (mode, NOT, tmp, tmp, 1); + } + tmp = expand_simple_binop (mode, AND, tmp, gen_int_mode (cf - ct, mode), |