From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2069.outbound.protection.outlook.com [40.107.22.69]) by sourceware.org (Postfix) with ESMTPS id 9B1F03858C5F for ; Tue, 18 Apr 2023 10:20:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9B1F03858C5F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=imKjXp8FB2Ev9XETR7yEYKpHHgaqdx27fj+i6LTMb5Q=; b=JW9k08n+5lHomOh4gbNYJr5re8lsBw/DBrOfnYXwkQtO8suzPbbj63Av1OCdgWMJf8Fj/i0hATcbZuEHOJ+xdoDL7TSfrAsZSETNfR+19XMz7NEFt6BXbZR3QiOz7eMU9gVa4d0VGsEWven+pO0EMk3S25CbtMrILI/+Y2dgECw= Received: from DB8PR03CA0031.eurprd03.prod.outlook.com (2603:10a6:10:be::44) by AM8PR08MB5682.eurprd08.prod.outlook.com (2603:10a6:20b:1c5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Tue, 18 Apr 2023 10:19:58 +0000 Received: from DBAEUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:be:cafe::45) by DB8PR03CA0031.outlook.office365.com (2603:10a6:10:be::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.47 via Frontend Transport; Tue, 18 Apr 2023 10:19:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT009.mail.protection.outlook.com (100.127.143.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.20 via Frontend Transport; Tue, 18 Apr 2023 10:19:57 +0000 Received: ("Tessian outbound 5bb4c51d5a1f:v136"); Tue, 18 Apr 2023 10:19:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4148cc679a5c71f1 X-CR-MTA-TID: 64aa7808 Received: from 9ce1929f7b6d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F0A153A3-4269-4AE1-A2D9-E9B1B0F1D855.1; Tue, 18 Apr 2023 10:19:51 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9ce1929f7b6d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 18 Apr 2023 10:19:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U7Hhr3fsqdMx2myVmsgxUZcFPwQxt0vgr2jn7qyC98fF1vveIZk/T4jmzvHBRiFOMP9qRZTk+/X2gOZli086+njZaOYbJ7nb6MjYsJXpJndsUMVtVfHTZZrPnQevgElluSNogWosl0Fl8SBZaEEHx5gAB9yFanjjrr18tfJ/yJBvD/Ie4UTvNmqDxJMIKOyb1YAMMUUKubbNXyq5OcsmMfpYabSReWlvsLmkq6bZi1VWkIiv8q4/NHi6Gr/qTAcMirUeR5lsvVAKotcYsdnsnveIkfKhXIV4TXPx+hUdFxgDlUB0vY79Q9cXgHGn5nVIKHRYfci3jskSkAFVG48ciA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=imKjXp8FB2Ev9XETR7yEYKpHHgaqdx27fj+i6LTMb5Q=; b=Rywqw8Qmeqna/nXEiH/dyjgjmmk3Neo8m0vTjltNDZIx1osCJAFevJWAsXRJwL75ErhRegadVZnalzUWdaeQvDBA8fChOD61csjH6FnO19ldGo/0J8zaMWARp2AogYfP9q6Zjj8eLdBif1sQbpvW17WUBsRFcA+FBhJWfS2InPwRXYnLi5wUUpWQ+xFMo6aa9ObQSWO6MvJMMMEW7EN3i247aMNS7lXMcIZvmHOa62Av+Fr5CuVc92xrO02RI3vG/jAaLnZR13cCUJD1XdOQ5AZastmnpwto1iv3pczmp+1JG3cNwMZU+qrNmOTCId4B0p3UltWlA2HPMGe0qvPi4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=imKjXp8FB2Ev9XETR7yEYKpHHgaqdx27fj+i6LTMb5Q=; b=JW9k08n+5lHomOh4gbNYJr5re8lsBw/DBrOfnYXwkQtO8suzPbbj63Av1OCdgWMJf8Fj/i0hATcbZuEHOJ+xdoDL7TSfrAsZSETNfR+19XMz7NEFt6BXbZR3QiOz7eMU9gVa4d0VGsEWven+pO0EMk3S25CbtMrILI/+Y2dgECw= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by DBAPR08MB5765.eurprd08.prod.outlook.com (2603:10a6:10:1ac::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Tue, 18 Apr 2023 10:19:47 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::73a3:ecc1:2c9c:3f71]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::73a3:ecc1:2c9c:3f71%4]) with mapi id 15.20.6298.045; Tue, 18 Apr 2023 10:19:47 +0000 Date: Tue, 18 Apr 2023 11:19:38 +0100 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, rguenther@suse.de, jlaw@ventanamicro.com Subject: [PATCH 1/3]middle-end match.pd: don't emit label if not needed Message-ID: Content-Type: multipart/mixed; boundary="WVUlxC66IGfyteO9" Content-Disposition: inline X-ClientProxiedBy: SA1PR05CA0014.namprd05.prod.outlook.com (2603:10b6:806:2d2::23) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|DBAPR08MB5765:EE_|DBAEUR03FT009:EE_|AM8PR08MB5682:EE_ X-MS-Office365-Filtering-Correlation-Id: bc623798-71c6-4622-e867-08db3ff67599 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: l7jW8MaCT/AfnOLfntNs0RtWyeE3ZwcS7LY4dRssmGg5oPboTRWRx4LE+ddsFCEfnVH1ekNoASjj41m3aerWIiV6GyHZANGXhXphn4u0uYGrqvCOnpYz7/JcfpAzZ0j6G6ptc6m8ZJpr0/eq2+ZyRWbnGUGm/WtTtj44pesC/IgT/J81HOpKlkYxFmD+B1oCLEUg0rT5gvHF53Bj6cgkQ9GlfzpiMtRZIS9YOFZYp8w+Z1oSgixUkckGRU4kY3KaMYSaLFGdeDnBlM09NybxkmYHVhoUUOnItO8yn7S9hyCHVBDUEf7vX02+Bh6675KDkbRJVh2oylv8wJyZQLSJGxXL3FqFLnor9a0iPjDe4SIx+qxM+NwjP8GIreXq/aGvyN2pyfY9UTjk8hmBeoKkxxcfyu4/0BKE8gLUbj0vmMYWQV300acR/ncOftF/vVElghkLJg9ITuv9V+Lp7STHMGWZD0bo9y2DS/Rhye740zf3Sosc40nWRuq4vmjUCFyCAPmS8ksKAPcN5vJNpVpAGhk6uUV91IB/eY8NnT8eNd1yzIrHPB6nKIlgXbMjie2LbREiLyidY+rl6aok8U5+zX2t6JVv08qdyFgsmfJ+GZrwQ6Tq9rrd3qRlob6vpaJx8v3cgjvKwaoj3Cy0H5hbvw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB5325.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(136003)(366004)(376002)(396003)(39850400004)(451199021)(36756003)(38100700002)(8936002)(8676002)(44832011)(235185007)(5660300002)(2906002)(86362001)(478600001)(6486002)(44144004)(6666004)(33964004)(4743002)(186003)(2616005)(6512007)(66946007)(6506007)(66476007)(26005)(41300700001)(316002)(83380400001)(6916009)(4326008)(66556008)(4216001)(2700100001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5765 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: af8f0d94-e85d-4fb6-c9a9-08db3ff66f75 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bymBe49j8BHfsVHFd4dAdmWl57HFNNA6Ru0q4saSnRMlEpFTlUisAB7YngW9SKrNLa9JdpKeHX56D9shlhNOZu7qIDSa55ufFw6Srgl+cDPqToDAtlNH4P7khhpfxdMmUMkzC6MeuGeo6kjKW6m+L0Q2X7p/NKGK2zDzv2zGqGodLHMJWa12MxlNXWQWXAQMhZa9xBVv2KtYCrUdoU0G9FjtK1JRa4/MbZqNzF1ZK1ik1lzZsTNp53VsAIw0wifhG7k0ZLWLJgya53a+7C5sI08Ezok2KtMeBNb7FIhZRhn7u/A2lD96WPBZWah0TR95Il0S7tidbjjHCWmQngbbm4ayT9TE5TH0C6D2MkMWlrgv2BB8BCq0GqKy6cl7xXxRdMJvbP5Ql01NOcvAskyDa+WDeE0uqw4u9HFWCMvoOP/PW0XjPT6r3yLVMA0qO5jTkp7peIZapAVCsFz1pqtJxbqdhqSFIkOTVPsgA/NkimQMDVU+uoUD+xUiJjrCimyAsonTX2KHwlNDTgnkGaWxjwDMFzzQnLSSUT/CuWpewUiIxlb4CqUHxCANoW+GHZL5uL9+PgjZfj+ydpVahatlsyKpZL1tuHW//M7iEzbBwM1uA1HXgQ/gmuDh/hjwLOyopSHLKZPtFtCaSGURR9Ugu5RY9LPcKQTtBxygY/Xhmh2VO7MiLQcZZkfjI/UEq5FS8nDfjf1cMjtNU97Y4PzNzQE2NozQtvA8pejqFqAUaGAoP7mNOEKUhnZBBW+avEHq X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(346002)(136003)(376002)(39860400002)(396003)(451199021)(36840700001)(40470700004)(46966006)(36756003)(8936002)(8676002)(40460700003)(44832011)(235185007)(5660300002)(2906002)(82310400005)(86362001)(40480700001)(478600001)(6486002)(44144004)(6666004)(33964004)(4743002)(186003)(107886003)(2616005)(36860700001)(6512007)(6506007)(70586007)(70206006)(26005)(41300700001)(356005)(82740400003)(316002)(83380400001)(81166007)(6916009)(4326008)(47076005)(336012)(4216001)(2700100001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2023 10:19:57.0426 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc623798-71c6-4622-e867-08db3ff67599 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5682 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Message-ID: <20230418101938.88K5zYUXcff9kFDLhu4oipWzEqR9_jvshwzdh9XLStA@z> --WVUlxC66IGfyteO9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi All, This is a small QoL codegen improvement for match.pd to not emit labels when they are not needed. The codegen is nice and there is a small (but consistent) improvement in compile time. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: PR bootstrap/84402 * genmatch.cc (dt_simplify::gen_1): Only emit labels if used. --- inline copy of patch -- diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc index 4fab4135347c43d95546a7df0bb1c4d074937288..638606b2502f640e59527fc5a0b23fa3bedd0cee 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -3352,6 +3352,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) char local_fail_label[256]; snprintf (local_fail_label, 256, "next_after_fail%u", ++fail_label_cnt); fail_label = local_fail_label; + bool needs_label = false; /* Analyze captures and perform early-outs on the incoming arguments that cover cases we cannot handle. */ @@ -3366,6 +3367,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) fprintf_indent (f, indent, "if (TREE_SIDE_EFFECTS (_p%d)) goto %s;\n", i, fail_label); + needs_label = true; if (verbose >= 1) warning_at (as_a (s->match)->ops[i]->location, "forcing toplevel operand to have no " @@ -3381,6 +3383,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) fprintf_indent (f, indent, "if (TREE_SIDE_EFFECTS (captures[%d])) " "goto %s;\n", i, fail_label); + needs_label = true; if (verbose >= 1) warning_at (cinfo.info[i].c->location, "forcing captured operand to have no " @@ -3423,7 +3426,10 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) } if (s->kind == simplify::SIMPLIFY) - fprintf_indent (f, indent, "if (UNLIKELY (!dbg_cnt (match))) goto %s;\n", fail_label); + { + fprintf_indent (f, indent, "if (UNLIKELY (!dbg_cnt (match))) goto %s;\n", fail_label); + needs_label = true; + } fprintf_indent (f, indent, "if (UNLIKELY (dump_file && (dump_flags & TDF_FOLDING))) " "fprintf (dump_file, \"%s ", @@ -3496,9 +3502,12 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) "res_op->resimplify (%s, valueize);\n", !e->force_leaf ? "lseq" : "NULL"); if (e->force_leaf) - fprintf_indent (f, indent, - "if (!maybe_push_res_to_seq (res_op, NULL)) " - "goto %s;\n", fail_label); + { + fprintf_indent (f, indent, + "if (!maybe_push_res_to_seq (res_op, NULL)) " + "goto %s;\n", fail_label); + needs_label = true; + } } } else if (result->type == operand::OP_CAPTURE @@ -3554,9 +3563,12 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) continue; if (cinfo.info[i].result_use_count > cinfo.info[i].match_use_count) - fprintf_indent (f, indent, - "if (! tree_invariant_p (captures[%d])) " - "goto %s;\n", i, fail_label); + { + fprintf_indent (f, indent, + "if (! tree_invariant_p (captures[%d])) " + "goto %s;\n", i, fail_label); + needs_label = true; + } } for (unsigned j = 0; j < e->ops.length (); ++j) { @@ -3607,6 +3619,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) { fprintf_indent (f, indent, "if (!_r)\n"); fprintf_indent (f, indent, " goto %s;\n", fail_label); + needs_label = true; } } } @@ -3647,7 +3660,8 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) } indent -= 2; fprintf_indent (f, indent, "}\n"); - fprintf (f, "%s:;\n", fail_label); + if (needs_label) + fprintf (f, "%s:;\n", fail_label); fail_label = NULL; } -- --WVUlxC66IGfyteO9 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="rb17157.patch" diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc index 4fab4135347c43d95546a7df0bb1c4d074937288..638606b2502f640e59527fc5a0b23fa3bedd0cee 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -3352,6 +3352,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) char local_fail_label[256]; snprintf (local_fail_label, 256, "next_after_fail%u", ++fail_label_cnt); fail_label = local_fail_label; + bool needs_label = false; /* Analyze captures and perform early-outs on the incoming arguments that cover cases we cannot handle. */ @@ -3366,6 +3367,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) fprintf_indent (f, indent, "if (TREE_SIDE_EFFECTS (_p%d)) goto %s;\n", i, fail_label); + needs_label = true; if (verbose >= 1) warning_at (as_a (s->match)->ops[i]->location, "forcing toplevel operand to have no " @@ -3381,6 +3383,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) fprintf_indent (f, indent, "if (TREE_SIDE_EFFECTS (captures[%d])) " "goto %s;\n", i, fail_label); + needs_label = true; if (verbose >= 1) warning_at (cinfo.info[i].c->location, "forcing captured operand to have no " @@ -3423,7 +3426,10 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) } if (s->kind == simplify::SIMPLIFY) - fprintf_indent (f, indent, "if (UNLIKELY (!dbg_cnt (match))) goto %s;\n", fail_label); + { + fprintf_indent (f, indent, "if (UNLIKELY (!dbg_cnt (match))) goto %s;\n", fail_label); + needs_label = true; + } fprintf_indent (f, indent, "if (UNLIKELY (dump_file && (dump_flags & TDF_FOLDING))) " "fprintf (dump_file, \"%s ", @@ -3496,9 +3502,12 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) "res_op->resimplify (%s, valueize);\n", !e->force_leaf ? "lseq" : "NULL"); if (e->force_leaf) - fprintf_indent (f, indent, - "if (!maybe_push_res_to_seq (res_op, NULL)) " - "goto %s;\n", fail_label); + { + fprintf_indent (f, indent, + "if (!maybe_push_res_to_seq (res_op, NULL)) " + "goto %s;\n", fail_label); + needs_label = true; + } } } else if (result->type == operand::OP_CAPTURE @@ -3554,9 +3563,12 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) continue; if (cinfo.info[i].result_use_count > cinfo.info[i].match_use_count) - fprintf_indent (f, indent, - "if (! tree_invariant_p (captures[%d])) " - "goto %s;\n", i, fail_label); + { + fprintf_indent (f, indent, + "if (! tree_invariant_p (captures[%d])) " + "goto %s;\n", i, fail_label); + needs_label = true; + } } for (unsigned j = 0; j < e->ops.length (); ++j) { @@ -3607,6 +3619,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) { fprintf_indent (f, indent, "if (!_r)\n"); fprintf_indent (f, indent, " goto %s;\n", fail_label); + needs_label = true; } } } @@ -3647,7 +3660,8 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) } indent -= 2; fprintf_indent (f, indent, "}\n"); - fprintf (f, "%s:;\n", fail_label); + if (needs_label) + fprintf (f, "%s:;\n", fail_label); fail_label = NULL; } --WVUlxC66IGfyteO9--