Message ID | 20221111194356.3922768-1-jcmvbkbc@gmail.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp932361wru; Fri, 11 Nov 2022 11:45:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf7nG/PtdwpH6y0R7V+Nc8n87o2cz8M5ApZnXSqcGQucvodt4/x06g7qbUhnmlw/VIT6n2L0 X-Received: by 2002:a50:baed:0:b0:461:46c7:53aa with SMTP id x100-20020a50baed000000b0046146c753aamr2847802ede.165.1668195903721; Fri, 11 Nov 2022 11:45:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668195903; cv=none; d=google.com; s=arc-20160816; b=uB6uerhpW6txYXtA7gBl5m6Vx737Aui9kQwy6MeGM9MjQZBCR1OF5ZGPKGaS2veHH9 /NoGkbYYGtJgfBYNNtlpi83wZfwRbTFhKakKUnDpABxTWLobLBLjBIUQTcqeFF5GkFf6 0yEscT12YNrP1qbhkodAkANdMQH3+frSaSJR/ycbVXcCLg9r3URq4z/vI5mZQJuVLjud kD1Ai09wbkIgGFXcQzKQdg1DiEpplmbiWsL2myA4Io32T3SjTOJuqLaTAcV/oHSpcKiL Rlx6xfj9JpoqT8s+kZVl9Gyml+qpfLu4GgVipI2oIsDfBuZrPV3sYTU9VB63zW+37nqA W0zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=WNzAypfv6mjhc9LEkhm3ewlLZYd4YhHHTmHuaol9T6w=; b=m6Id+gmcT+ETuR9QGO7YfQ1XhRplOl2MXVLfFOORS7ASco9gCiU/IfFTHwk9B+ZPL+ 087rXI8Jd0J3NOc0+WBvvFrKztXnS1LYT5n7WeslRqrvemIY3anJq/W3RMoU+JwIa8yR wo5EVQvpe+JLZICGS4COCqo1CJZNFJ199rDPY2veLCsUbq1pH4Z60oLNH+xabXjg3t8m k8gIAVxjbVYp5cQraaTSxiw0img+8LRZznZDPp7n6QNEYz/yr1fx5vd34De2Xhtz1vQz VIazyGBgcAVE1TuZaEmsMB47GXBDTebwgQPGaJR7VYDVYbGqKx69Dj01FAFaF2n73aaf Zw0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=lFhfUrHt; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id y4-20020a056402134400b00462bd784df2si2150842edw.542.2022.11.11.11.45.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 11:45:03 -0800 (PST) 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=@gcc.gnu.org header.s=default header.b=lFhfUrHt; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 42C5D3858430 for <ouuuleilei@gmail.com>; Fri, 11 Nov 2022 19:45:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42C5D3858430 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668195902; bh=WNzAypfv6mjhc9LEkhm3ewlLZYd4YhHHTmHuaol9T6w=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=lFhfUrHtt+9u1kAGo8r9gqBF9SY2a9rKKK8EuSTojZ57NzMziBFn4m3uOTGljrPkW Q+jYyQUpq42lRKABwE+qHVR+9OHOd2jY4lXkchXWaCyBCYrb5PlLoc9OZ5yCBjH8xP 1zBrFutPAAXjXmZEBln4aQJlVldBBM0bP/6kE+Po= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 1394E3858D38 for <gcc-patches@gcc.gnu.org>; Fri, 11 Nov 2022 19:44:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1394E3858D38 Received: by mail-pg1-x52b.google.com with SMTP id b62so5181218pgc.0 for <gcc-patches@gcc.gnu.org>; Fri, 11 Nov 2022 11:44:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WNzAypfv6mjhc9LEkhm3ewlLZYd4YhHHTmHuaol9T6w=; b=IP7i+U6dUNtpbDYtxmD+7MJaTs2ZWaWnnqMngeRdOgBa4T50GQWwRl/yujTUOBmslS uwOfzPHRVVm/VlNBpiO1Rgut7vEpJX6Ge6OlHhS0aRwgApe4h3Vu16gJ+NY9KZmSuwI2 1wev8LE4kf8ft8XvsDEKFQvjWjQseLJteMxYRm1iG5DdRz7lRciHn4algA+ipusF+q+T zhdBHRhv7r/uNFqFCn0e4ytBacpjaocf/2cWZiiwNmUWV3LOSj2wR9DFLyx0AyS3hC6Q M67l4ZHPBMFj2xejVN6MVtbaL+C4ncx+uIxwiiYW81N2Cj/3mqEEZnmQTv7ISNtUyUkI n7WA== X-Gm-Message-State: ANoB5pl0/7cjw9E6RYyAJUxDYINS8JhYM7HoOxHsheKzpp0IFtqacvd9 jPur7fTsGkZFrx17lYQ+WpVt3B6RHQOe9w== X-Received: by 2002:a63:5062:0:b0:470:6559:a538 with SMTP id q34-20020a635062000000b004706559a538mr2867112pgl.427.1668195857615; Fri, 11 Nov 2022 11:44:17 -0800 (PST) Received: from octofox.hsd1.ca.comcast.net ([2601:641:401:1d20:364d:9faf:fac4:d8fa]) by smtp.gmail.com with ESMTPSA id m15-20020a656a0f000000b0045dc85c4a5fsm1691097pgu.44.2022.11.11.11.44.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 11:44:16 -0800 (PST) To: gcc-patches@gcc.gnu.org Cc: Jeff Law <jeffreyalaw@gmail.com>, Andreas Schwab <schwab@linux-m68k.org>, Max Filippov <jcmvbkbc@gmail.com> Subject: [PATCH] gcc: m68k: fix PR target/107645 Date: Fri, 11 Nov 2022 11:43:56 -0800 Message-Id: <20221111194356.3922768-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, FROM_LOCAL_NOVOWEL, GIT_PATCH_0, HK_RANDOM_ENVFROM, HK_RANDOM_FROM, KAM_NUMSUBJECT, 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> From: Max Filippov via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Max Filippov <jcmvbkbc@gmail.com> 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?1749230188152906137?= X-GMAIL-MSGID: =?utf-8?q?1749230188152906137?= |
Series |
gcc: m68k: fix PR target/107645
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Max Filippov
Nov. 11, 2022, 7:43 p.m. UTC
gcc/ PR target/107645 * config/m68k/predicates.md (symbolic_operand): Return false when UNSPEC is under the CONST node. --- Regtested with --enable-checking=all for target=m68k-linux-uclibc, no new regressions compared to the compiler built without checking. Ok for master? gcc/config/m68k/predicates.md | 2 ++ 1 file changed, 2 insertions(+)
Comments
On 11/11/22 12:43, Max Filippov wrote: > gcc/ > PR target/107645 > * config/m68k/predicates.md (symbolic_operand): Return false > when UNSPEC is under the CONST node. Isn't the underlying object still symbolic though, thus returning false seems wrong. insn 342 341 343 35 (set (reg:SI 97) (mem/u:SI (plus:SI (reg:SI 13 %a5) (const:SI (unspec:SI [ (symbol_ref:SI ("__gcov_kvp_dynamic_pool_index") [flags 0x40] <var_decl 0x7f9e83fe7cf0 __gcov_kvp_dynamic_pool_index>) (const_int 0 [0]) ] 6))) [0 S4 A8])) "gcc/libgcc/libgcov.h":472:44 55 {*movsi_m68k2} (expr_list:REG_EQUAL (symbol_ref:SI ("__gcov_kvp_dynamic_pool_index") [flags 0x40] <var_decl 0x7f9e83fe7cf0 __gcov_kvp_dynamic_pool_index>) (nil))) ISTM that we'd need to strip the unspec and process its argument instead. But maybe I'm missing something. jeff
On Sat, Nov 12, 2022 at 11:42 AM Jeff Law <jeffreyalaw@gmail.com> wrote: > ISTM that we'd need to strip the unspec and process its argument > instead. I tried that first, the result was more ICEs because that pattern wasn't recognized at later stages. Then I read the change to the comment over the symbolic_operand predicate: https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/config/m68k/predicates.md;h=6ca261fb92a2b7ecd53a0356d06410e2c0d70965;hp=417989f6d6c408fa82af9f9649a204b9a754d1dc;hb=75df395f15f2;hpb=676fd528c9990a4f1046b51d40059893c3a71490 and that made me think that the intention was to not recognize the unspecs in that predicate.
On 11/12/22 20:47, Max Filippov wrote: > On Sat, Nov 12, 2022 at 11:42 AM Jeff Law <jeffreyalaw@gmail.com> wrote: >> ISTM that we'd need to strip the unspec and process its argument >> instead. > I tried that first, the result was more ICEs because that pattern > wasn't recognized at later stages. Then I read the change to the > comment over the symbolic_operand predicate: > https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/config/m68k/predicates.md;h=6ca261fb92a2b7ecd53a0356d06410e2c0d70965;hp=417989f6d6c408fa82af9f9649a204b9a754d1dc;hb=75df395f15f2;hpb=676fd528c9990a4f1046b51d40059893c3a71490 > and that made me think that the intention was to not recognize > the unspecs in that predicate. Thanks for clarifying. ISTM that operand predicate is quite poorly named. OK for the trunk. jeff
On Tue, Nov 15, 2022 at 7:33 PM Jeff Law <jeffreyalaw@gmail.com> wrote: > Thanks for clarifying. ISTM that operand predicate is quite poorly named. > > OK for the trunk. Thanks. Applied to master. -- Max
diff --git a/gcc/config/m68k/predicates.md b/gcc/config/m68k/predicates.md index f8dedd9f8375..094a18955534 100644 --- a/gcc/config/m68k/predicates.md +++ b/gcc/config/m68k/predicates.md @@ -141,6 +141,8 @@ case CONST: op = XEXP (op, 0); + if (GET_CODE (op) == UNSPEC) + return false; return ((GET_CODE (XEXP (op, 0)) == SYMBOL_REF || GET_CODE (XEXP (op, 0)) == LABEL_REF) && GET_CODE (XEXP (op, 1)) == CONST_INT);