]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gimple: Fix comment before gimple_cond_make_false/gimple_cond_make_true
authorAndrew Pinski <quic_apinski@quicinc.com>
Wed, 23 Apr 2025 20:48:16 +0000 (13:48 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Fri, 25 Apr 2025 18:26:28 +0000 (11:26 -0700)
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_apinski@quicinc.com>
gcc/gimple.h

index 112e5ae472d03a54d1d51c92d3c2044d94a2f074..7e3086f5632e418d08bed37aed18a9c78ccb0cf4 100644 (file)
@@ -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