https://gcc.gnu.org/g:996729efbf6d0dd9684f5e598a0069d20d3bc26b

commit r16-151-g996729efbf6d0dd9684f5e598a0069d20d3bc26b
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Wed Apr 23 13:48:16 2025 -0700

    gimple: Fix comment before gimple_cond_make_false/gimple_cond_make_true
    
    I noticed the comments and the code don't match.
    The correct form is:
    'if (0 != 0)': false
    and
    'if (1 != 0)': true
    
    That is always NE and always 0 as the second operand.
    
    Also there is a spello for statement in the comment in
    front of gimple_cond_true_p.
    
    Pushed as obvious.
    
    gcc/ChangeLog:
    
            * gimple.h (gimple_cond_make_false): Fix comment.
            (gimple_cond_make_true): Likewise.
            (gimple_cond_true_p): Fix spello for statement in comment.
    
    Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>

Diff:
---
 gcc/gimple.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/gimple.h b/gcc/gimple.h
index 112e5ae472d0..7e3086f5632e 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -3829,7 +3829,7 @@ gimple_cond_false_label (const gcond *gs)
 }
 
 
-/* Set the conditional COND_STMT to be of the form 'if (1 == 0)'.  */
+/* Set the conditional COND_STMT to be of the form 'if (0 != 0)'.  */
 
 inline void
 gimple_cond_make_false (gcond *gs)
@@ -3840,7 +3840,7 @@ gimple_cond_make_false (gcond *gs)
 }
 
 
-/* Set the conditional COND_STMT to be of the form 'if (1 == 1)'.  */
+/* Set the conditional COND_STMT to be of the form 'if (1 != 0)'.  */
 
 inline void
 gimple_cond_make_true (gcond *gs)
@@ -3850,7 +3850,7 @@ gimple_cond_make_true (gcond *gs)
   gs->subcode = NE_EXPR;
 }
 
-/* Check if conditional statemente GS is of the form 'if (1 == 1)',
+/* Check if conditional statement GS is of the form 'if (1 == 1)',
   'if (0 == 0)', 'if (1 != 0)' or 'if (0 != 1)' */
 
 inline bool

Reply via email to