public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-1623] MATCH: Fix comment for `(zero_one ==/!= 0) ? y : z <op> y` patterns
@ 2023-06-07 21:30 Andrew Pinski
  0 siblings, 0 replies; only message in thread
From: Andrew Pinski @ 2023-06-07 21:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:941209f9da23b4e0f338ed970012fcfa7b20e528

commit r14-1623-g941209f9da23b4e0f338ed970012fcfa7b20e528
Author: Andrew Pinski <apinski@marvell.com>
Date:   Wed Jun 7 06:47:42 2023 -0700

    MATCH: Fix comment for `(zero_one ==/!= 0) ? y : z <op> y` patterns
    
    The patterns match more than just `a & 1` so change the comment
    for these two patterns to say that.
    
    Committed as obvious after a bootstrap/test on x86_64-linux-gnu.
    
    gcc/ChangeLog:
    
            * match.pd: Fix comment for the
            `(zero_one ==/!= 0) ? y : z <op> y` patterns.

Diff:
---
 gcc/match.pd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/match.pd b/gcc/match.pd
index fd32389decf..4ad037d641a 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -3685,7 +3685,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
   (cond (le @0 integer_zerop@1) (negate@2 @0) integer_zerop@1)
   (max @2 @1))
 
-/* ((x & 0x1) == 0) ? y : z <op> y -> (-(typeof(y))(x & 0x1) & z) <op> y */
+/* (zero_one == 0) ? y : z <op> y -> (-(typeof(y))zero_one & z) <op> y */
 (for op (bit_xor bit_ior)
  (simplify
   (cond (eq zero_one_valued_p@0
@@ -3697,7 +3697,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
        && (INTEGRAL_TYPE_P (TREE_TYPE (@0))))
        (op (bit_and (negate (convert:type @0)) @2) @1))))
 
-/* ((x & 0x1) == 0) ? z <op> y : y -> (-(typeof(y))(x & 0x1) & z) <op> y */
+/* (zero_one != 0) ? z <op> y : y -> (-(typeof(y))zero_one & z) <op> y */
 (for op (bit_xor bit_ior)
  (simplify
   (cond (ne zero_one_valued_p@0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-07 21:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-07 21:30 [gcc r14-1623] MATCH: Fix comment for `(zero_one ==/!= 0) ? y : z <op> y` patterns Andrew Pinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).