Message ID | 86bc153e-8fc7-5654-07f2-a6c16fd346c1@ventanamicro.com |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp175147wrt; Mon, 26 Sep 2022 23:19:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5jP0Lq3t4gXj0rzTiN7IwcM1c/d8Mk5n8+laxVV2kpFwPGUlWHDlpu6YGaw47YjG7ZfP0+ X-Received: by 2002:a05:6402:4311:b0:451:c437:a5a9 with SMTP id m17-20020a056402431100b00451c437a5a9mr25066690edc.272.1664259588921; Mon, 26 Sep 2022 23:19:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664259588; cv=none; d=google.com; s=arc-20160816; b=W0EdSuBV0vr1Nyx/z0lYiFJ59d3mCKoWyiqcU1tqeRmq/Ql3KKO9CbaPeY2e3yn+/D ZEfpmEOxQs2KSHrRki5kRexsQbyHxDOG7gzMqtmZ2XD952ALlSm7Z/fGHPbFZ4muvjXs ObGpdoHqekXZKizI4rf3gxHnaWKoBmNlTVWdDCMpddeIKoXa/Gl4r17r1B91t+7zk6o5 1vRQ85tG3MKGmDtxJ98LM4MH2yuhtEHJHe1QIG2S5vxb+VRKVTGK+8cgHMOaVMDYWxZC mzWBA4JsaJXKbvw8obznAiD8+BZmyaDy9TfUsqa6F/Z3ZMx5aShcXf3bu7JqxyWeq0cB pQWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:to:subject:from :content-language:user-agent:mime-version:date:message-id :dkim-signature:dmarc-filter:delivered-to; bh=W3NP0PeLYJJYWuHvALYbPZNJkOyTOxYuwIfgS9ftGPs=; b=s7U+Qq5UwhnMjs0CbT1OUPwAPDpSmQix8Ajs7qallGBMUX/oKcXDZmSKRYjaGn5fXy Di05SKqcOjxtEXHPXRNsTPR9KFxzm77S88CacH8+2/s9kbrzfRWgfhoz+VBfscPvpf58 SL3xIzudlin2ghNEHqzVRKxjPf+QlvmMnMvj5a+JLIiG0w+zDOxyJhjZ15xDha95eFk2 fXY2fSzE5oe5CdHpel1NjF0ugdrZHMREKrT1AN3KZAMwEz5vzCTdnCvmwR2ZkmWq60/x DRxctaFMhSZpP8otjzLLJdoXkKuBoivhNkDl+Cl3fmkeSy4gL61rk71jaR4ghW0ycaiU +ilQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b="B/xb8gce"; 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 sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id r3-20020a170906c28300b0077f5096f6edsi389068ejz.592.2022.09.26.23.19.48 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 23:19:48 -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=@ventanamicro.com header.s=google header.b="B/xb8gce"; 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 0FFEE3858CDA for <ouuuleilei@gmail.com>; Tue, 27 Sep 2022 06:19:43 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 26BE8385841D for <gcc-patches@gcc.gnu.org>; Tue, 27 Sep 2022 06:19:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 26BE8385841D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-pf1-x436.google.com with SMTP id a80so8806419pfa.4 for <gcc-patches@gcc.gnu.org>; Mon, 26 Sep 2022 23:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=to:subject:from:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date; bh=W3NP0PeLYJJYWuHvALYbPZNJkOyTOxYuwIfgS9ftGPs=; b=B/xb8gcevdpwjEKZ28pEbjYbUIt+QDzkltySQsUDICoNvqR3y+O1Z/2UUbzLNSth95 tVzO/urHQQxlA4v6fG2MXFl1w2HFAeRMj26uBqJwDQWz2WdYXTpYWKUAcTwiPptROzCP IZLp7lx6z0l0soiBmnpJ2IPk1gFilRTCFOBflJReExv2tQBsOObFMFLOKfNuodXM/aJ1 iifZNVwVUXqTA0Jax1GMHAqLZqG0UXNgqI40uLPXmNqxjgvNjzLhEYxn6cmM0Xtyc0O4 az8cdoa+I3Ln1PVoDzoQ/vZaw4dPcYXBpENmLrVpwdDRnBXj2Rx8GJFDeRFVW9P88DsG oPcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:from:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date; bh=W3NP0PeLYJJYWuHvALYbPZNJkOyTOxYuwIfgS9ftGPs=; b=0a+iOXjrB6MQYe4eq6I8sGJdgEYECcioaH5P9nvW7rdXHfZ/kGbPPH8L53jaD+Qcvm mmOzkXKwhtBe1NveX/P2QggleT+82zDj5GFm6gh578KqHVnetthKFY+QeugukXpXFV3X lYO7iEVkVjJCErjIrDqPFnlyA0nJNn7AKuqvM2/w+80M0RkUuwk0S+h+Tsv9OnAFL1wH SNjpZEYdSYeCKy4d4jHE5ODNMpmhipDRxu8+S6rY68WJMcykBBn8CqkuVi6c3hWoau8O ESodVR3QtHSNs2TdHFte5zxTu4yzsAMH8uzkT3VSTfmzkYI+6TICgYkeXCBBBbYa/IP4 xtbQ== X-Gm-Message-State: ACrzQf2huMTE5O/DXMiJ9g9uqG9EpO3DFYSnHEtLGUDKxm0qqjKkf3Qi 76S98bTHSpE42kqBYX+wLTocLuK7qZ5c7ODa X-Received: by 2002:a05:6a00:1486:b0:557:f3c7:219f with SMTP id v6-20020a056a00148600b00557f3c7219fmr12577048pfu.0.1664259557758; Mon, 26 Sep 2022 23:19:17 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id m12-20020a633f0c000000b0043bf861008fsm584473pga.90.2022.09.26.23.19.16 for <gcc-patches@gcc.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Sep 2022 23:19:17 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------2G833zPqZKGtIrug5eG0rq5a" Message-ID: <86bc153e-8fc7-5654-07f2-a6c16fd346c1@ventanamicro.com> Date: Tue, 27 Sep 2022 00:19:16 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Content-Language: en-US From: Jeff Law <jlaw@ventanamicro.com> Subject: [committed] Fix ICE's due to jump-to-return optimization changes To: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 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.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1745102662815087931?= X-GMAIL-MSGID: =?utf-8?q?1745102662815087931?= |
Series |
[committed] Fix ICE's due to jump-to-return optimization changes
|
|
Commit Message
Jeff Law
Sept. 27, 2022, 6:19 a.m. UTC
v850 and rl78 failed to build newlib with an ICE. I've also got a report from an ARM automated tester that looks like the same underlying problem. Basically we need to check if simple_return and return insns are available before trying to use them. Bootstrapped on x86_64 (regression testing in progress). Verified this fixes the v850 and rl78 build failures. Installing on the trunk momentarily. Jeff commit fe527a06a77093bc3de4ee2007516a4e9fa30f18 Author: Jeff Law <jeffreyalaw@gmail.com> Date: Tue Sep 27 01:44:38 2022 -0400 Fix ICEs due to recent jump-to-return optimization gcc/ * cfgrtl.cc (fixup_reorder_chain): Verify that simple_return and return are available before trying to use them.
diff --git a/gcc/cfgrtl.cc b/gcc/cfgrtl.cc index 90cd6ee56a7..281a432f6a6 100644 --- a/gcc/cfgrtl.cc +++ b/gcc/cfgrtl.cc @@ -4049,7 +4049,8 @@ fixup_reorder_chain (void) rtx_insn *ret, *use; basic_block dest; if (bb_is_just_return (e_fall->dest, &ret, &use) - && (PATTERN (ret) == simple_return_rtx || PATTERN (ret) == ret_rtx)) + && ((PATTERN (ret) == simple_return_rtx && targetm.have_simple_return ()) + || (PATTERN (ret) == ret_rtx && targetm.have_return ()))) { ret_label = PATTERN (ret); dest = EXIT_BLOCK_PTR_FOR_FN (cfun);