Message ID | 6227dee3-744e-418d-bc09-edf7da1923af@ventanamicro.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3781734vqb; Mon, 16 Oct 2023 16:17:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbDFlVyhV5ly2VRN1pfcnTYmnSOYASN/0aO4tp45m6FHFeN5WdLimq874BMWivFDAfI6Bx X-Received: by 2002:ac8:7f8e:0:b0:3f6:aff0:6dec with SMTP id z14-20020ac87f8e000000b003f6aff06decmr757851qtj.32.1697498248257; Mon, 16 Oct 2023 16:17:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697498248; cv=pass; d=google.com; s=arc-20160816; b=D/Rwv/8CHB40Ww7HlBap/Xey29mRohMmQaLGGhJK0Ik6wtD23HILHFx+D8/PAWs6FP GPlr6YtCWKEBJhFQtwwJe7iqiXb6x8Jt3VKAPPETGfSMio1vhOv9SFwv0yRZP69wHz+8 9OJQo4X9/xbpzhpwO5Ukp6lyWoQrjCqXLC4KpzXVB0OEzIwuK5MvDA3OGy7kIw/GOI5W +xh+ilWMnbv+FZhOzAqhLawAYXT1+jXjvpqzMwQ6WZN9jghsvBPxNZRb5xSc9TAhXusE PtrVhpYitM5rwuteTXLfV7pXWI4Z/R48OpDm2NGROJ0aSHgntC4S9Z6RR7jejppnDmet Vdng== ARC-Message-Signature: i=2; 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:subject:from:to :content-language:user-agent:mime-version:date:message-id :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=UB/ge7Ti6n7iOMEvQq5rbUBbn0kL3Amn/8WGOOs7R64=; fh=XNn3asQvIblazGK92GBt13dVv+YmGV3pBS0JC29ZQco=; b=smUdMCDlIrprhE3X8ZN5QS/1QE7xQf4B7JfKCj1KWDGQ8NVFwb+gMT++rQC0/F0Rwk P2m4e/+BQ01FUQucsSd7PD6/9X6QMeebek6HutaUhaUmUZ0RtxjctTzdsIOnOLT2GhaI Jl9tsKzrfjU64J+QQ8CM5tRk+eYIlfpCU4twDHO1115vi3nHm/zx32ZH6+A2qkg23FcS 2esZM6ZTzmZQC8wY+FgBMbddgPEW8w9UXKNQKvE/TFKKjmK3FvN+5pble0Mpz44nnsZ5 02uZ7I2MbQrPiimrjhGA9hRiGOTilbtrUsKjMa83kG2kJi44xyM40mB9Gu4k7BUgyICZ FK/g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=cSx3WhyT; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id w17-20020a05622a135100b00418af4b3762si276975qtk.173.2023.10.16.16.17.28 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 16:17:28 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=cSx3WhyT; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 0CECA3858298 for <ouuuleilei@gmail.com>; Mon, 16 Oct 2023 23:17:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 8ECBD3858C54 for <gcc-patches@gcc.gnu.org>; Mon, 16 Oct 2023 23:17:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8ECBD3858C54 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ventanamicro.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8ECBD3858C54 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697498225; cv=none; b=lnycm+tHsSiK1gsnIorSiqlwK2Eq2XaO85oVoRzhlZ3CUiggj05rU/eqbOxrbov2C6y5UHE6GJ2Yb7/fTFAriv2Y6F/2mHjQVNUdPNTT/N6utF4Ia7DOFA0IWtn848dvate/Bo6ZEIEq0bPiaSywsN8B+toX0madnL9JPS82k/Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697498225; c=relaxed/simple; bh=pub+Hp3uO6XUKHGGlepngekj382nnak0KI5Y6i8SCXs=; h=DKIM-Signature:Message-ID:Date:MIME-Version:To:From:Subject; b=Bb8Tg3gQtEi/vV5Tuc4o7Lsd7+JSPmNT2Jm7CXYv5udKmic937jxGrO54PLUAFyZAarO1lDlDTpNKxzthJMWB0+HfnmzGBTwnaOGIh2s5EtTHnlTOku8gWDeeFQ1JZbTb4MRTU+UM898mDOwI8KvxnTTVlaMHHKpO0gPS5mKLC8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6ba54c3ed97so2278427b3a.2 for <gcc-patches@gcc.gnu.org>; Mon, 16 Oct 2023 16:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1697498220; x=1698103020; darn=gcc.gnu.org; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=UB/ge7Ti6n7iOMEvQq5rbUBbn0kL3Amn/8WGOOs7R64=; b=cSx3WhyT/rANOeEtG+6Aezx6vM1O+D56HL83eB4aW5OYfd3YJeFXbQ43jitA6RCYsf lgqxSNUgh5gWqonyUaV7vHwAQAzLXRZyxnZjnSGUjzot28IY09MdEl0nTsxBD8JRgQb0 OBa3cQxyrtTQ/ni6naZ0VIzk/80jC/ZMWxwEs7PbG0hUqWezf/CwGXPZlRlbupoviMaz OHh4MXrEX8irw2cjmJdWBxMXwJhLddYwzPU4RYEAVqKtfO6Gn2rBegWSdXBuhWfwYvkb h3vWJ7Qx2oh6tVinY/9dM7YyNMZ9Onbg1qn7c9BRiNXZ9xMqCcXpoiiiKlc1triAIP68 tsVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697498220; x=1698103020; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UB/ge7Ti6n7iOMEvQq5rbUBbn0kL3Amn/8WGOOs7R64=; b=UvySEWgpCxafuGqhe2boE1DMHxYorKs5SUBEEd4vLlniDq/PxPjyecy6YbwqETbIOQ +M9E1W7BM8hLq7k/aiRYOXJBxilRFjqXBMeqmJYdgAGf9Aw+sspquedzA3cJkgyJhGbm DDVcF4SS/AWRQi0yYMU2D2WG4sTpRpeUjKTstLYlJzTsuzPQnDhHfV5u2qlDemQyWO+u y2PaZCMaXru0wIHF4qB3AwG0E9/uhVESvPtVCXZy8V6eTNm1b3Tl8uAo/buIvCPkwjbM PJTjeQKVeaJdZHMy41/09p6rP10YY2GSWSwN8o6uuukj8KX3qGk2Lqowh0sSNN3Ct+AZ YA6w== X-Gm-Message-State: AOJu0YzdudQPmfwV3o8IDV8VKoaqg2u+rK3LxvixU97+Jw9E6HXaqxzV opvx09zhxF/LR0Fj6hGKOarPIttj4C/El7Pbqqg= X-Received: by 2002:a05:6a20:e11d:b0:179:fbe5:fb1f with SMTP id kr29-20020a056a20e11d00b00179fbe5fb1fmr582548pzb.29.1697498220052; Mon, 16 Oct 2023 16:17:00 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id t7-20020a170902e84700b001bc21222e34sm143963plg.285.2023.10.16.16.16.58 for <gcc-patches@gcc.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Oct 2023 16:16:59 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------D4PV1ax40btPLxnbu7HPM279" Message-ID: <6227dee3-744e-418d-bc09-edf7da1923af@ventanamicro.com> Date: Mon, 16 Oct 2023 17:16:55 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org> From: Jeff Law <jlaw@ventanamicro.com> Subject: [committed] Fix minor problem in stack probing X-Spam-Status: No, score=-11.1 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.30 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779955923201859225 X-GMAIL-MSGID: 1779955923201859225 |
Series |
[committed] Fix minor problem in stack probing
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Jeff Law
Oct. 16, 2023, 11:16 p.m. UTC
probe_stack_range has an assert to capture the possibility that that expand_binop might not construct its result in the provided target (TEST_ADDR in this case). We triggered that internally a little while ago. I'm pretty sure it was in the testsuite, so no new testcase. The fix is easy, copy the result into the proper target when needed. Bootstrapped and regression tested on x86. Pushed to the trunk. Jeff commit b626751a4e87b090531c648631df33ac20c4fab8 Author: Jeff Law <jlaw@ventanamicro.com> Date: Mon Oct 16 17:14:38 2023 -0600 Fix minor problem in stack probing probe_stack_range has an assert to capture the possibility that that expand_binop might not construct its result in the provided target. We triggered that internally a little while ago. I'm pretty sure it was in the testsuite, so no new testcase. The fix is easy, copy the result into the proper target when needed. Bootstrapped and regression tested on x86. gcc/ * explow.cc (probe_stack_range): Handle case when expand_binop does not construct its result in the expected location.
diff --git a/gcc/explow.cc b/gcc/explow.cc index 6424c0802f0..0c03ac350bb 100644 --- a/gcc/explow.cc +++ b/gcc/explow.cc @@ -1818,7 +1818,10 @@ probe_stack_range (HOST_WIDE_INT first, rtx size) gen_int_mode (PROBE_INTERVAL, Pmode), test_addr, 1, OPTAB_WIDEN); - gcc_assert (temp == test_addr); + /* There is no guarantee that expand_binop constructs its result + in TEST_ADDR. So copy into TEST_ADDR if necessary. */ + if (temp != test_addr) + emit_move_insn (test_addr, temp); /* Probe at TEST_ADDR. */ emit_stack_probe (test_addr);