This is the mail archive of the
`gcc-patches@gcc.gnu.org`
mailing list for the GCC project.

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |

Other format: | [Raw text] |

*From*: Paolo Bonzini <paolo dot bonzini at polimi dot it>*To*: GCC Patches <gcc-patches at gcc dot gnu dot org>*Date*: Tue, 08 Jun 2004 16:37:04 +0200*Subject*: RFT/RFA: Eliminate gen_binary, take 2

undetected under i686-pc-linux-gnu because of the absence of these instructions. I'm sorry to people using other archs.

The actual changelog if approved would be the same as in the gen_binary elimination patch, since distribute_and_simplify_rtx was described simply as "New function" there.

2004-06-06 Paolo Bonzini <bonzini@gnu.org> * combine.c (distribute_and_simplify_rtx): Fix handling of (and (xor (B C) (not A))). Index: combine.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/combine.c,v retrieving revision 1.430 diff -u -r1.430 combine.c --- combine.c 27 May 2004 08:28:28 -0000 1.430 +++ combine.c 3 Jun 2004 09:00:27 -0000 @@ -7895,13 +7895,10 @@ /* (and (xor B C) (not A)) == (xor (ior A B) (ior A C)) */ if (outer == AND && inner == XOR && GET_CODE (op1) == NOT) { - new_op0 = simplify_gen_binary (IOR, mode, inner_op0, op1); - new_op1 = simplify_gen_binary (IOR, mode, inner_op1, op1); + new_op0 = simplify_gen_binary (IOR, mode, inner_op0, XEXP (op1, 0)); + new_op1 = simplify_gen_binary (IOR, mode, inner_op1, XEXP (op1, 0)); x = apply_distributive_law (simplify_gen_binary (XOR, mode, new_op0, new_op1)); - - if (GET_CODE (x) != AND) - return x; } else { @@ -7909,10 +7906,9 @@ new_op1 = simplify_gen_binary (outer, mode, inner_op1, op1); x = apply_distributive_law (simplify_gen_binary (inner, mode, new_op0, new_op1)); - - if (GET_CODE (x) != outer) - return x; } + if (GET_CODE (x) != outer) + return x; } if (ARITHMETIC_P (op1)) @@ -7924,13 +7920,10 @@ /* (and (not A) (xor B C)) == (xor (ior A B) (ior A C)) */ if (outer == AND && inner == XOR && GET_CODE (op0) == NOT) { - new_op0 = simplify_gen_binary (IOR, mode, inner_op0, op0); - new_op1 = simplify_gen_binary (IOR, mode, inner_op1, op0); + new_op0 = simplify_gen_binary (IOR, mode, inner_op0, XEXP (op0, 0)); + new_op1 = simplify_gen_binary (IOR, mode, inner_op1, XEXP (op0, 0)); x = apply_distributive_law (simplify_gen_binary (XOR, mode, new_op0, new_op1)); - - if (GET_CODE (x) != AND) - return x; } else { @@ -7938,10 +7931,9 @@ new_op1 = simplify_gen_binary (outer, mode, op0, inner_op1); x = apply_distributive_law (simplify_gen_binary (inner, mode, new_op0, new_op1)); - - if (GET_CODE (x) != outer) - return x; } + if (GET_CODE (x) != outer) + return x; } return NULL_RTX;

**Follow-Ups**:**Re: RFT/RFA: Eliminate gen_binary, take 2***From:*Roger Sayle

**Re: RFT/RFA: Eliminate gen_binary, take 2***From:*Eric Botcazou

**Re: RFT/RFA: Eliminate gen_binary, take 2***From:*Eric Botcazou

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |