[Committed] Correct comment in apply_distributive_law

Roger Sayle roger@eyesopen.com
Sat Aug 23 15:16:00 GMT 2003


I've committed the patch below to mainline as "obviously correct".
The comment in combine.c's apply_distributive_law was incorrect.
I've now fixed that and hopefully made the example easier to follow.


2003-08-23  Roger Sayle  <roger@eyesopen.com>

	* combine.c (apply_distributive_law): Correct comment.


Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.378
diff -c -3 -p -r1.378 combine.c
*** combine.c	22 Aug 2003 06:45:12 -0000	1.378
--- combine.c	23 Aug 2003 14:42:40 -0000
*************** apply_distributive_law (rtx x)
*** 7955,7961 ****
    tem = gen_binary (code, GET_MODE (x), lhs, rhs);

    /* There is one exception to the general way of distributing:
!      (a ^ b) | (a ^ c) -> (~a) & (b ^ c)  */
    if (code == XOR && inner_code == IOR)
      {
        inner_code = AND;
--- 7955,7961 ----
    tem = gen_binary (code, GET_MODE (x), lhs, rhs);

    /* There is one exception to the general way of distributing:
!      (a | c) ^ (b | c) -> (a ^ b) & ~c  */
    if (code == XOR && inner_code == IOR)
      {
        inner_code = AND;

Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833



More information about the Gcc-patches mailing list