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: 148294 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp106490vqb; Wed, 4 Oct 2023 05:49:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHRd2bbfW0lTU5EbPgVMCXFqlTTtRqelbJQO6eP3aOLVt/kRMWzCXkx4+PNfvOsA0ywI2Fn X-Received: by 2002:a17:906:290:b0:9b2:89eb:79b5 with SMTP id 16-20020a170906029000b009b289eb79b5mr2094595ejf.35.1696423757237; Wed, 04 Oct 2023 05:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696423757; cv=none; d=google.com; s=arc-20160816; b=T4Qz6+GV4i58B+BZN5Vgl6bbm1p3ems4oFNhqQ1hdzsR5g360L1VPCyEqcaBVeTsr+ BfwO0eaW0ZbKuOB+hGYXUdOa5DNKgEuovXyyqk1ThNbuXybG5QfkTVrGANdk8CbHBJgS ETSsctVLt0emNLnJ0sxa6o6fYuMH4krqLVwEH1uNrE9EcxMIRnnVvvmU7U6kXAglI22y AQXL/Qi9YI9yPT3eiOgY6KpOIyWBPrkiHQE0rBz7AecUxva9VGH793svG1jBbXXT87fG b/fEzF+DnaD0mtNDzATF3mfAdbJj78Tg5gemsp5YdReMYZwRSq/94IpzhSnUNEmCMy8G 3bEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dmarc-filter:delivered-to; bh=o+b6ZILWJpGEZuNNHK6yRuxTPYnuXnUZD2SQAqyBQtQ=; fh=9YvKuYzPOH4H8p6ZxADoseEyE0mG6135swhZOYPib+Q=; b=tLogejWmF8ZusLZbmDALHvmTAPz/PGrACQg9+qte9+lKqrgwbHk1VmLjk3WF07Sxu1 xkC24xUIdAbAtXrm8Y0vRjEzwzrW9BHhdfzQKupc66UL4xKJkfc9HjRBZOy7J+556HuJ m14ORPXTOo4qFIZR1go3SMoxRiLugyKvfritv7FpVCOTrkY527luf6Qu53T9o2M9Glul D8M9VOAl3A5zwiq+O1sY8FF5qHljlGhb3UQgeqW/UbPDTrWPHg20OLBNqwHxE1T2SvHc 0fYXY/TjUh6wDCEJOHM7B/p7WJdlHrFK7uCIYMwyHtANcg4Xv/aMbEtLuAQI1H/w/UeW Krgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kolabnow.com header.s=dkim20160331 header.b=Bv4bZIco; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id jw21-20020a17090776b500b0099bd627bb9dsi1684301ejc.983.2023.10.04.05.49.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 05:49:17 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@kolabnow.com header.s=dkim20160331 header.b=Bv4bZIco; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5CF2E385B516 for ; Wed, 4 Oct 2023 12:43:01 +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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778829237541276633 X-GMAIL-MSGID: 1778829237541276633 --- 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 ();