From patchwork Wed Oct 4 12:39:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= X-Patchwork-Id: 1843320 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (4096-bit key; secure) header.d=kolabnow.com header.i=@kolabnow.com header.a=rsa-sha256 header.s=dkim20160331 header.b=Bv4bZIco; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S0vVk5WN1z20Zl for ; Wed, 4 Oct 2023 23:43:10 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D6024395202C for ; Wed, 4 Oct 2023 12:42:48 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx.kolabnow.com (mx.kolabnow.com [212.103.80.155]) by sourceware.org (Postfix) with ESMTPS id 2FFF3383740F for ; Wed, 4 Oct 2023 12:41:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2FFF3383740F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lambda.is Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lambda.is Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 5F83720D4987; Wed, 4 Oct 2023 14:41:07 +0200 (CEST) Authentication-Results: ext-mx-out011.mykolab.com (amavis); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1696423266; x=1698237667; bh=o+b6ZILWJpGEZuNNHK6yRuxTPYnuXnUZD2SQAqyBQtQ=; b=Bv4bZIcoNF6O VXYCkQU5tp7c0xVPymthP/VHSOr3xcRLqQER1JP38zV10kS37esyqDWxjPhxSWBo +QMBTQTVv2TvODcnI2tCB/Towa+TTBCNO5FpCUcXqGl0A0BRTnS/Rviycx0A/Isf sI+EXxl+JnqKg2a/diQk+U8giE58hgdZY6bA+b1PV+ZbOiHNCW+RMt6Fj/40lEDQ p5gkzopOoG8jONCmOpPp4X1PTvxmJZt0AHDlavB5nZ3+XH7KOqQyZAKr1h50tc+R eXlQqEMd3Rnbex9CJyPGDsQ3Wdj5DOKSjyFVw8r31i8C4qwCfRDT0fDIgOYfgl6H QZsmVDgKGC5nM56Bn3ccsufUmaJu8Ehzc+sBHy1pxjLNuumcAEJgqGowdQLgQcRD a1ekZbhaY59zkCMsk1IGCwhKUFbZkr1ceIOxRTFZOVoDENu4Yf+UHtal9On3tkG+ csqHg81Uy34plEhXeDqlGVlJHZ6uwhc+tsRAqmHusrgLxVCeWE0CPkaBgcJZ9hon x1e/okIaqv6UBIyMdwN38O85kpBTiFjL0rviJNWrMm7ahlcAXv3dqDInrmn1Hxyg Hk79lkjoZo+zIxciXvX75HXwluL+B40vl+/GH+Ln9u+FP18+1LnDo+NzxmdSfxzU N8Awwz2xjO0uRteZrO9yGXa4Ix2ivyU= X-Virus-Scanned: amavis at mykolab.com X-Spam-Score: -0.999 X-Spam-Level: X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id 7Vj2tNMYfyOt; Wed, 4 Oct 2023 14:41:06 +0200 (CEST) Received: from int-mx009.mykolab.com (unknown [10.9.13.9]) by mx.kolabnow.com (Postfix) with ESMTPS id C190F20C81FD; Wed, 4 Oct 2023 14:41:06 +0200 (CEST) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx009.mykolab.com (Postfix) with ESMTPS id B0DBB20D6AE9; Wed, 4 Oct 2023 14:41:06 +0200 (CEST) From: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= To: gcc-patches@gcc.gnu.org Cc: mliska@suse.cz, jh@suse.cz, =?utf-8?q?J=C3=B8rgen_Kvalsvik?= Subject: [PATCH 19/22] Beautify assert Date: Wed, 4 Oct 2023 21:39:19 +0900 Message-Id: <20231004123921.634024-20-j@lambda.is> In-Reply-To: <20231004123921.634024-1-j@lambda.is> References: <20231004123921.634024-1-j@lambda.is> MIME-Version: 1.0 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org --- gcc/tree-profile.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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& 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 ();