From patchwork Tue Jun 20 16:44:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 110613 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3797895vqr; Tue, 20 Jun 2023 09:44:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4RcNg8YNJ2BWZGz6tro1Luve0ogb4boVCVQ2c5D3IQZIYEDGee4dkkGlDGYObm2x5bLRcN X-Received: by 2002:a17:906:7945:b0:978:b94e:83dd with SMTP id l5-20020a170906794500b00978b94e83ddmr12580848ejo.75.1687279492806; Tue, 20 Jun 2023 09:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687279492; cv=none; d=google.com; s=arc-20160816; b=pKPh7XiPLlNv8PL5HXC4aHyLS6mqopdiX5neAkY7vZF61gkvb1IWWxlLqnuDJhJWky EiTV6bCOvkLI7pe7xw75AbcpTirzlyVLomzQoqHWJlhNwQVYzvDbZR7ydAhpHJ24pN3H TnH//pb/sHxIG5q6a3S8Vo1SMTKtigmOLlCYHeWRlV6KYa9jvNsGNHJ4gmKlSIkw5tro 2DkJHZddNf3jDFuuQmsUW5VFNHEcLYYawkMEt5R6V71JjY/1s1W8GB4GvQfEdhESLxX9 aVYWd5rJfrlm+2e6j5EIG0v0EE75K05QQHKu2ls4thQjr5kemSt1BvkUrWHzrGp010uO HHhA== 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:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=51q6fITSWPLF53mzsq9F5LAJQNM8KCpRnLULaPGShMA=; b=XLKW6Cxj0AI46ByKmtV06O/fePkgPPWqzi9tp1Zr7XY/VyAvld/pemCbRSaj+LQSqa ZlQYbqb6WkoL9fMfjOTuknjE4PtaGpZsQOrBl9ynSDSl5gNNJAjUu3g/JHZQ3D4LX7ro zGwDxoAtgiMYy24FnjOcoZkVHi170kT2Av5fzqZ6fDv0iEFmZmHnXvxO1AqmRd0yJiW7 gxVtt08GlX3+SuH6PDVHI0eapnvdx490FHOXE+2t92umMdWcTpyFWfW7q6NoJO40pbDl lNdhno7Vc9e2cjJ83ImtO94Hald4h0Xsu5L4c6VuG0f31nOfobDLK/zp5ZtNHlz6gXSl SofA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=DRgm4bb3; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id q15-20020a170906770f00b0098922462edbsi1247482ejm.802.2023.06.20.09.44.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 09:44:52 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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=@sourceware.org header.s=default header.b=DRgm4bb3; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 816F93858D28 for ; Tue, 20 Jun 2023 16:44:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 816F93858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1687279488; bh=51q6fITSWPLF53mzsq9F5LAJQNM8KCpRnLULaPGShMA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=DRgm4bb3CjP+kjH0C9fxTqKhIPn23kc2aFKiJ2kGd1O4yIza6mLQSUO+14ImXye6b sBDXW3yIcxhKVnwozXmWpaZixmoznAL35Vm9ZlQFz6Hhtcc32LF3AZAG8bM946/D6l O6MbiJ6K8qQMl6+k9eiwukMGM/CTM56JD+00r0Bs= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by sourceware.org (Postfix) with ESMTPS id B5C9E3858D1E for ; Tue, 20 Jun 2023 16:44:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5C9E3858D1E Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-53fbf2c42bfso4059135a12.3 for ; Tue, 20 Jun 2023 09:44:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687279478; x=1689871478; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=51q6fITSWPLF53mzsq9F5LAJQNM8KCpRnLULaPGShMA=; b=C9DOEnuPlj88iq61IEHqYe2cfsEc/V41mOdV+KNemYle10V8nBqzfUbZUfxu+xWcxQ yyJ9gany6GxJHu+kgnHw2xmgcOeiqOj6+Fd0eABAiO/1N1Ru+A77w/lda50kHSsnmU4R cUKHiYDKKJGzE7Fsychr8TTmrnEUvMZqBdzt3zo1SQ9aojiieCGI2C26vM1OIisnZZd4 roJgOP1G77uJDxtVBwKQz1qnGYRh8crBut9hyn71SqJQ4FnnT0jiCOQGJkKhbzO1Yc+N CwDHwQyK5FPJ3gcwZiUp0O7gVsAqHHjRZsT2xezFuLeafuzCvp+XgGHarIZdhxUMnbve HKEQ== X-Gm-Message-State: AC+VfDzri8aGcH+xBBCqFcwx+1eD6yA7CR4i26Y6NoRPPS0zVbTfpDDV TzjHM2qg5mBSsqVxbMwk0o4OCVMGFRY= X-Received: by 2002:a17:90a:38a1:b0:25e:886b:c6b with SMTP id x30-20020a17090a38a100b0025e886b0c6bmr11104914pjb.48.1687279478212; Tue, 20 Jun 2023 09:44:38 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.160.123]) by smtp.gmail.com with ESMTPSA id m14-20020a170902db0e00b001aad714400asm1827834plx.229.2023.06.20.09.44.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 09:44:37 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id B2942740170 for ; Tue, 20 Jun 2023 09:44:36 -0700 (PDT) To: binutils@sourceware.org Subject: [PATCH] x86: Don't check if AVX512 template requires AVX512VL Date: Tue, 20 Jun 2023 09:44:36 -0700 Message-Id: <20230620164436.432481-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3025.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Binutils" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769240781342375347?= X-GMAIL-MSGID: =?utf-8?q?1769240781342375347?= If the ZMM operand in an AVX12 template also allows XMM or ZMM, this template must require AVX512VL. Drop the AVX512VL requirement check on such AVX512 templates. * config/tc-i386.c (check_VecOperands): Don't check if AVX512 template requires AVX512VL. --- gas/config/tc-i386.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index de35ee2a2c6..dcafac0c0cd 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -6288,11 +6288,10 @@ check_VecOperands (const insn_template *t) /* Templates allowing for ZMMword as well as YMMword and/or XMMword for any one operand are implicity requiring AVX512VL support if the actual operand size is YMMword or XMMword. Since this function runs after - template matching, there's no need to check for YMMword/XMMword in - the template. */ + template matching, there's no need to check for YMMword/XMMword nor + AVX512VL in the template. */ cpu = cpu_flags_and (t->cpu_flags, avx512); if (!cpu_flags_all_zero (&cpu) - && !t->cpu_flags.bitfield.cpuavx512vl && !cpu_arch_flags.bitfield.cpuavx512vl) { for (op = 0; op < t->operands; ++op)