From patchwork Wed Aug 17 21:28:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Sayle X-Patchwork-Id: 587 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6a10:38f:b0:2d5:3c95:9e21 with SMTP id 15csp2902068pxh; Wed, 17 Aug 2022 14:28:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR6cxkzkBScduJ5DvjCQdzasFbDboHw16csoDsMgmtih12cZgTlngzH9R77X6IN78Mp55toC X-Received: by 2002:a05:6402:2684:b0:43d:9964:d2a0 with SMTP id w4-20020a056402268400b0043d9964d2a0mr15155edd.250.1660771724660; Wed, 17 Aug 2022 14:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660771724; cv=none; d=google.com; s=arc-20160816; b=xe2R8i1GUdhMehu0y7a5IN+skCOuVXu5NY7Ccz+K6Br06HRLoNx46zkPNv/8LOaY7w iA9FXdXn4b+z3dhnrLMY5J9XMBp7U5XH8r+HyZglBUEpNXyrf555iVHSvRliMDLQNsLU U4Yd/NdE10jA116SvCavhAaztWj3p2ctcwZZkLou4MahATSgf8KQClPpxTeQtFYqGxZl 1CgI9HyqDAn8P+rSXqzkNTUfJQZASWMUamhApxOEcoeZGdhSwMk+P46M+am6KSKY/9vM jmpaP3BVrvYTKr8s+2pj1IM6wS0oFQI+qc9ZqaILmWHVzfwc/owzCakrqrp6FcUWxUv4 8pyw== 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:content-language:thread-index :mime-version:message-id:date:subject:to:from:dkim-signature :dmarc-filter:delivered-to; bh=qC1D4m8cISnnSinju5VPvhyN+t++xDCGDJFTdGBKnJQ=; b=HJ7Uv2fy9e0BwyThimtjG9o9R1KVzFacWhrbFkFgvdX6yIgCZgtq5eif4CvGhQ3wLO udhykooh9gknn0a/6pNCol392Bcauo8lX9ztL787XZFsa2HQ69vTltkQDVAjn21Gp3bi 5RHKzp1z9I53IqBsosUq4jE9uZwV9AofV3mO9oLOvuSBvxDETWtlXKRWmIIe2dDopQwB sHfnBDFZxizFGv/NP0nMUCoFIjrf2Y7lOo9B2wfnuqPKVu3MeLxmeQT/35ByPjXlhvwC Cv4pmJRNahXSKulZh4LlYsR82IrjMpwHuyp+dzV5CLPaq2He2caT2wbZjS9i19S7mGHQ tlqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nextmovesoftware.com header.s=default header.b=iGEoIWGQ; 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 sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id f1-20020a056402194100b00445561ca201si5341038edz.263.2022.08.17.14.28.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 14:28:44 -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=fail header.i=@nextmovesoftware.com header.s=default header.b=iGEoIWGQ; 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 C3312385842F for ; Wed, 17 Aug 2022 21:28:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from server.nextmovesoftware.com (server.nextmovesoftware.com [162.254.253.69]) by sourceware.org (Postfix) with ESMTPS id C69023858D1E for ; Wed, 17 Aug 2022 21:28:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C69023858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nextmovesoftware.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nextmovesoftware.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nextmovesoftware.com; s=default; h=Content-Type:MIME-Version:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qC1D4m8cISnnSinju5VPvhyN+t++xDCGDJFTdGBKnJQ=; b=iGEoIWGQ5qRGhpfK4aGclc8/3h FkWB+jd11ENArmLbPwYSWkOd3gBOEHondmDeFDLaZYOUqRyTwqgwfXotV6iZelfJSq6BjjmX2YLUI AFR8+O8Xlle+omFGSHjnL6os9MjYmGsASsI23Ods83IgjXJUMw6/b8nEVHIV90gOjgN5JxED4aiqq Rhv1iMHlrpPRZJKrq7sL8yy/v7UIMM1hsn+k3tE6nU7538Cq2QYXPKCXke+Rqicd9JHRXcdWNQ8N5 aVUOAPwCFKDwFNzw2NMBDgXjzEoh1WTxiOQem7RbJuxuPlGpq6qkGN6G04QgDNuBtPIm7WSe7DOqU 1rCrA2GQ==; Received: from host86-169-41-119.range86-169.btcentralplus.com ([86.169.41.119]:54272 helo=Dell) by server.nextmovesoftware.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oOQaC-0002Vt-TI for gcc-patches@gcc.gnu.org; Wed, 17 Aug 2022 17:28:13 -0400 From: "Roger Sayle" To: "'GCC Patches'" Subject: [Committed] PR target/106640: Fix use of XINT in TImode compute_convert_gain. Date: Wed, 17 Aug 2022 22:28:11 +0100 Message-ID: <011f01d8b280$41a4ff80$c4eefe80$@nextmovesoftware.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: Adiyfjd+LgmpAnZfT86WEw+1HJ6VmA== Content-Language: en-gb X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.nextmovesoftware.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nextmovesoftware.com X-Get-Message-Sender-Via: server.nextmovesoftware.com: authenticated_id: roger@nextmovesoftware.com X-Authenticated-Sender: server.nextmovesoftware.com: roger@nextmovesoftware.com X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1741445371707057029?= X-GMAIL-MSGID: =?utf-8?q?1741445371707057029?= Thanks to Zdenek Sojka for reporting PR target/106640 where an RTL checking build reveals a thinko in my recent patch to support TImode shifts/rotates in STV. My "senior moment" was to inappropriately use XINT where I should be using INTVAL of XEXP. I can't imagine what I was thinking. Corrected by the patch below, tested on x86_64-pc-linux-gnu with make bootstrap, both with and without --enable-checking=rtl, and regression tested, both with and without --target_board=unix{-m32}, with no new failures. Committed to mainline as obvious. 2022-08-17 Roger Sayle gcc/ChangeLog PR target/106640 * config/i386/i386-features.cc (timde_scalar_chain::compute_convert_gain): Replace incorrect use of XINT with INTVAL (XEXP (src, 1)). Roger diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc index 821d8c7..d6bb66c 100644 --- a/gcc/config/i386/i386-features.cc +++ b/gcc/config/i386/i386-features.cc @@ -1248,7 +1248,7 @@ timode_scalar_chain::compute_convert_gain () case ASHIFT: case LSHIFTRT: /* See ix86_expand_v1ti_shift. */ - op1val = XINT (src, 1); + op1val = INTVAL (XEXP (src, 1)); if (optimize_insn_for_size_p ()) { if (op1val == 64 || op1val == 65) @@ -1282,7 +1282,7 @@ timode_scalar_chain::compute_convert_gain () case ASHIFTRT: /* See ix86_expand_v1ti_ashiftrt. */ - op1val = XINT (src, 1); + op1val = INTVAL (XEXP (src, 1)); if (optimize_insn_for_size_p ()) { if (op1val == 64 || op1val == 127) @@ -1355,7 +1355,7 @@ timode_scalar_chain::compute_convert_gain () case ROTATE: case ROTATERT: /* See ix86_expand_v1ti_rotate. */ - op1val = XINT (src, 1); + op1val = INTVAL (XEXP (src, 1)); if (optimize_insn_for_size_p ()) { scost = COSTS_N_BYTES (13);