From patchwork Sun Mar 3 06:43:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 1907207 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TnXNV3NzYz23qX for ; Sun, 3 Mar 2024 17:43:52 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 57ECA3858415 for ; Sun, 3 Mar 2024 06:43:50 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mailout10.t-online.de (mailout10.t-online.de [194.25.134.21]) by sourceware.org (Postfix) with ESMTPS id C06B73858C55 for ; Sun, 3 Mar 2024 06:43:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C06B73858C55 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=t-online.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=t-online.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C06B73858C55 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=194.25.134.21 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709448205; cv=none; b=M/Oc5MntUKMmU5k030qN1QflSHLnRfGhWom7KvieFdF6/o1nX05Mopa8nTUJpMpz+ovjPfeqJ1q8s0WGmZHSKG+llFFXJTIka3vV1kkHCQ8qdGtOZCOZLkP2PvaB/cwVyDM1aHdTfemiTHf9IbrHl0Ro0PqzmIOmCOyTXmqpG2o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709448205; c=relaxed/simple; bh=sx/gGeNDzEWXF0bsK/1RgDMfmEBPWEFDkeDV+2+UBBE=; h=Message-ID:Subject:From:To:Date:MIME-Version; b=laRlIgct8yLMDX6tR/yF4DNJr3vFBI6/PwtMt/kCE3qlztJX9BE0G+0qD4cuca0ib+QF5hBmcsrIv0Z5bpF1KF4J1CQb7nxZ1j5iKED4dSngnGpyhPHyBSOgpgdHSim8tf4MvApUQhW5imhtkn3h5uMGqZRicb6NKymUJFdCti8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from fwd88.aul.t-online.de (fwd88.aul.t-online.de [10.223.144.114]) by mailout10.t-online.de (Postfix) with SMTP id A965437E9C for ; Sun, 3 Mar 2024 07:43:17 +0100 (CET) Received: from localhost.localdomain ([115.165.108.210]) by fwd88.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1rgfZ6-1k8tVY0; Sun, 3 Mar 2024 07:43:17 +0100 Message-ID: Subject: [committed][SH] Fix 101737 From: Oleg Endo To: gcc-patches Date: Sun, 03 Mar 2024 15:43:12 +0900 User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-TOI-EXPURGATEID: 150726::1709448197-D8F62DC7-41623A72/0/0 CLEAN NORMAL X-TOI-MSGID: bc60aae4-659c-474f-b0be-aa2868b36be6 X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Hi, The attached patch should fix PR 101737. It's a rather obvious oversight. Sanity tested with 'make all-gcc'. Committed to master, gcc-13, gcc-12, gcc-11. Cheers, Oleg gcc/ChangeLog: PR target/101737 * config/sh/sh.cc (sh_is_nott_insn): Handle case where the input is not an insn, but e.g. a code label. From 4ff8ffe7331cf174668cf5c729fd68ff327ab014 Mon Sep 17 00:00:00 2001 From: Oleg Endo Date: Sun, 3 Mar 2024 14:58:58 +0900 Subject: [PATCH] SH: Fix 101737 gcc/ChangeLog: PR target/101737 * config/sh/sh.cc (sh_is_nott_insn): Handle case where the input is not an insn, but e.g. a code label. --- gcc/config/sh/sh.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/sh/sh.cc b/gcc/config/sh/sh.cc index 27777c4..ef3c2e6 100644 --- a/gcc/config/sh/sh.cc +++ b/gcc/config/sh/sh.cc @@ -11766,9 +11766,10 @@ sh_insn_operands_modified_between_p (rtx_insn* operands_insn, negates the T bit and stores the result in the T bit. */ bool sh_is_nott_insn (const rtx_insn* i) { - return i != NULL && GET_CODE (PATTERN (i)) == SET + return i != NULL_RTX && PATTERN (i) != NULL_RTX + && GET_CODE (PATTERN (i)) == SET && t_reg_operand (XEXP (PATTERN (i), 0), VOIDmode) && negt_reg_operand (XEXP (PATTERN (i), 1), VOIDmode); } -- libgit2 1.6.4