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>
}
-/* 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)
}
-/* 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)
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