Message ID | 20231115094705.3976553-3-hongyu.wang@intel.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2428641vqg; Wed, 15 Nov 2023 01:47:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGy0ZBfbClYEe5JMSsDOrmaIFKUzk+HCwCJpo4Td5HizYs3lMuoWzQR8GvH32WsWqV0qukV X-Received: by 2002:a67:c383:0:b0:45d:852c:3e9f with SMTP id s3-20020a67c383000000b0045d852c3e9fmr11946947vsj.8.1700041658728; Wed, 15 Nov 2023 01:47:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700041658; cv=pass; d=google.com; s=arc-20160816; b=fGHq1a0WEu1hdhHpBrZS9zFAyIrr1Wr7dE5Bg1+peJ7WPbEmCwtrMP3Co3CtiAtvkK SBkIKNI9HbwyTsakqF/kFccfD7LpUZM9M9jZ3nu271fpyKhl02m/bJ6qUgTZu3aKOfsc Pv+MbY/rz3KryWbUAXGDcBjjMPxOyXeH+PRvzzAhVPIiFeWD7KYCgwJ4fhYgWiCRoWIL 4X+HptJyirtXFImzdZ4zTxAHnN+g6vKrmLhHmm4MjqVuhNp1w7QyyqNwBbK+m/K+t3e/ Wr7XvDtomhq2gSFHcyieUFVSEzFCxtuTtU/cksRclrZ6Yf0Zw7+x6c20KvM2iMrfou/3 oiBg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=By3ftjJwLWQV9Hx3QJlgL8zbb7OnXPDiyWTi3mof3Io=; fh=n8eNxIWSYJwy/CU3QSXzDvE/zeEoomCGojuOcYEQEyQ=; b=stTGGArMCmOjS5aGliPVcxAazkFE2+sV+9dvogM11zmVGEjlBmBNRpMsx/ZNnZVJfC NoASw9f4jPlfbeVGiJFcPZHBxlslKrulbtzx7sisHTXA74Igg1qI47HjHU0XFhMYQUob d+VVEwtEWGP2DfMqAvr+Ql/6iVihvbP7fd9RU3CGkH1y2XZoEcd+SCCUG2TqVZloFnwL 6+UDXjdFkLGlv38nK+IY+bJqx4pkxOmemVPhFgRlFTEveEBtMfY+QtinB+EPykSHisc1 nXmzYzOIpi3oAvZet8anfKdZ9PHm/U3godkpX3IT/2V41JZqm+ZYO2dKzXXYzSrOYBN5 QN2w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="b/EQrbDk"; arc=pass (i=1); 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=intel.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id t40-20020a05622a182800b00417a65a82besi9366716qtc.414.2023.11.15.01.47.38 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 01:47:38 -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=@intel.com header.s=Intel header.b="b/EQrbDk"; arc=pass (i=1); 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=intel.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 40FC03857C7C for <ouuuleilei@gmail.com>; Wed, 15 Nov 2023 09:47:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by sourceware.org (Postfix) with ESMTPS id 4DE343858C98 for <gcc-patches@gcc.gnu.org>; Wed, 15 Nov 2023 09:47:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4DE343858C98 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4DE343858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=134.134.136.31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700041631; cv=none; b=MMuvIcXRV91ZrQWn/3iUVw4e0KmlpRHGoXHu541DQ/MYjPb31AakS13aPrpI3hxhmyOPQP8p/RZMbIFo2apF4IuOpU7fQjunlVM7TvDJ3rJd4BnTofAOT7SplL8S36IEsrxurQBs5YOVbpWeskA4HrvkZCaJXSicJ6hFrOlLHwQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700041631; c=relaxed/simple; bh=7eydAPM26+JtVSt/KxuCrlJ58nR8vRZQHBCN+NUh20U=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Y+VMLv52N/7Re5+SeowGYJcZ5RdSxh42Z5Z6bTeGZ/RSUVgoTccxcerSs599kDcEMGKqHDHQxUzywMd+FMt591qaxL1ZqE+XoRGm3s7KZDeZssLzRQqwURdhLdbsgz0KUP4JMYoPwj6LqfVKSNiWQqjG+jGNTXhyfU7ROjzu5Kg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700041629; x=1731577629; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7eydAPM26+JtVSt/KxuCrlJ58nR8vRZQHBCN+NUh20U=; b=b/EQrbDkVOmmIq8BTmUBP4XYA77eiPsGbyvjcWGGXpKcxFtlJDdd1zbq dyfSvD8iw6MoSgaQf5c1trRg/Hwk+MjAJRaIokTL2EpUY8WK7DEPH0Vjm MYesjGrIgwJvWOOoKjeedSc7ulCFhuIuYcZmoOj2NLAGmIjs4eltqz0uu GdQVpEELIPFkZr5OyN2eXI42IzCa2XlEVtc4CF/ca1+97MEX3ZcKWbqX7 bW1r7NTNO9ILpFk1Gm3na2zovlP+93K9g2P7l/MP7/NbmhApdwDkJXyKu InGTwRg8Qs/F9uw1HStI7Ml7Q9TfTJ+83j+LCIc/vaFEZd5BKXUVn5psE Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10894"; a="455138345" X-IronPort-AV: E=Sophos;i="6.03,304,1694761200"; d="scan'208";a="455138345" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2023 01:47:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,304,1694761200"; d="scan'208";a="6105926" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by orviesa002.jf.intel.com with ESMTP; 15 Nov 2023 01:47:07 -0800 Received: from shliclel4217.sh.intel.com (shliclel4217.sh.intel.com [10.239.240.127]) by shvmail03.sh.intel.com (Postfix) with ESMTP id AAA2A1005676; Wed, 15 Nov 2023 17:47:05 +0800 (CST) From: Hongyu Wang <hongyu.wang@intel.com> To: gcc-patches@gcc.gnu.org Cc: ubizjak@gmail.com, hongtao.liu@intel.com Subject: [PATCH 02/16] [APX NDD] Restrict TImode register usage when NDD enabled Date: Wed, 15 Nov 2023 17:46:51 +0800 Message-Id: <20231115094705.3976553-3-hongyu.wang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231115094705.3976553-1-hongyu.wang@intel.com> References: <20231115094705.3976553-1-hongyu.wang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE, SPF_SOFTFAIL, 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 <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: 1782622882144599072 X-GMAIL-MSGID: 1782622882144599072 |
Series |
Support Intel APX NDD
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Hongyu Wang
Nov. 15, 2023, 9:46 a.m. UTC
Under APX NDD, previous TImode allocation will have issue that it was originally allocated using continuous pair, like rax:rdi, rdi:rdx. This will cause issue for all TImode NDD patterns. For NDD we will not assume the arithmetic operations like add have dependency between dest and src1, then write to 1st highpart rdi will be overrided by the 2nd lowpart rdi if 2nd lowpart rdi have different src as input, then the write to 1st highpart rdi will missed and cause miscompliation. To resolve this, under TARGET_APX_NDD we'd only allow register with even regno to be allocated with TImode, then TImode registers will be allocated with non-overlapping pairs. There could be some error for inline assembly if it forcely allocate __int128 with odd number general register. gcc/ChangeLog: * config/i386/i386.cc (ix86_hard_regno_mode_ok): Restrict even regno for TImode if APX NDD enabled. --- gcc/config/i386/i386.cc | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index 683ac643bc8..3779d5b1206 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -20824,6 +20824,16 @@ ix86_hard_regno_mode_ok (unsigned int regno, machine_mode mode) return true; return !can_create_pseudo_p (); } + /* With TImode we previously have assumption that src1/dest will use same + register, so the allocation of highpart/lowpart can be consecutive, and + 2 TImode insn would held their low/highpart in continuous sequence like + rax:rdx, rdx:rcx. This will not work for APX_NDD since NDD allows + different registers as dest/src1, when writes to 2nd lowpart will impact + the writes to 1st highpart, then the insn will be optimized out. So for + TImode pattern if we support NDD form, the allowed register number should + be even to avoid such mixed high/low part override. */ + else if (TARGET_APX_NDD && mode == TImode) + return regno % 2 == 0; /* We handle both integer and floats in the general purpose registers. */ else if (VALID_INT_MODE_P (mode) || VALID_FP_MODE_P (mode))