[19/22] Beautify assert

Message ID 20231004123921.634024-20-j@lambda.is
State Unresolved
Headers
Series [01/22] Add condition coverage profiling |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Jørgen Kvalsvik Oct. 4, 2023, 12:39 p.m. UTC
  ---
 gcc/tree-profile.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gcc/tree-profile.cc b/gcc/tree-profile.cc
index ce679130ca0..f329be84ad2 100644
--- a/gcc/tree-profile.cc
+++ b/gcc/tree-profile.cc
@@ -784,8 +784,8 @@  isolate_expression (conds_ctx &ctx, basic_block p, vec<basic_block>& out)
 	   infinitely.  If this should happen, we should bail out and give up
 	   instrumentation for the function altogether.  It is possible no such
 	   CFGs exist, so for now this is an assert.  */
-	if (bitmap_equal_p (prev, expr) || bitmap_count_bits (expr) < 2)
-	    gcc_assert (false);
+	gcc_assert (!bitmap_equal_p (prev, expr));
+	gcc_assert (bitmap_count_bits (expr) > 2);
 	bitmap_copy (prev, expr);
 
 	const unsigned NGlen = NG.length ();