From patchwork Tue Nov 7 02:27:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiang, Haochen" X-Patchwork-Id: 162243 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp3055677vqu; Mon, 6 Nov 2023 18:28:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjLrIsYFMNArxFIgkFWQheBOvINPiAn/7GGcMbqnX1gDlpjy5E9mZhjITu0u9tt2EicIup X-Received: by 2002:a05:620a:86ce:b0:778:9be8:275c with SMTP id pr14-20020a05620a86ce00b007789be8275cmr34498025qkn.33.1699324083344; Mon, 06 Nov 2023 18:28:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699324083; cv=pass; d=google.com; s=arc-20160816; b=F0loXM9gXNpfZFh8J16+hPmXQWmQoSsPgdBuaVqMzTy9kNaFeJbpOllzAVW35B8rvZ Ou5X8BHF9CiI+32Cl+IwoJR8wnNHomAgTfViHA/K+FvL9gkgpSGNE3cUer9xB7zVTFc6 Y6UGV6BPR78L5w2sD2GeRuKQuchxjeTWTZ5bjWCbV1iSjMQMYNMx724WpFZscTlZzjKw 5qZKGI0iHaydr8sXjXn5MeoaPj9TS40dshK1WlMqZWSqhTMR+u+0A70gzZFHLxU1GxXe o5x9NOXiR48/i9vxX9rGNmn/cC9d2cjYupFi3HyOhuHU3EmhnGFVZhw5hr1qsl98fZxL qg5w== 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:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=ue0Oa79kwSvHMPcAaY7DelgrIwSHu3qlCFt2BCVhDAw=; fh=M9HM6ASxJ13myMyxe6+D5Y8nbneXlY5qT/Udj6S6pN8=; b=MAcJSuwiM1WaLUI6L1rMkEeAzNE3zgbawXu9ZVv6mt0CoDNg6LoC6KVgQa3FOmMTy2 LaEdGmN7CBQSmQ/1Ze8YLKLa0WVzTpwMO1kd7KevT46Vq+WPN4x0/xYnutBcvEhDwiyG m9qu+ohQbfyDc1NQlHWprcSOU0wu9XjHLWhcoDxz+00w2LSKSN5xsZMaz4v7lxeuEDw1 mD+/odzXRrhddSPNVXpsUfY2B3enKmhbvC3e3T2K61kxH6/DxCqcTXEruLRiUc6bFG2g Y0pMSnFy2zZwbjAVndNpPQecMFUaAGOBbKVQrgOwxGIZjt3ZS/9+ql1juywOr24f7JIA chwA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Bv9uqniM; 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 qw8-20020a05620a8b0800b00779da0028d3si6359986qkn.654.2023.11.06.18.28.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 18:28: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=@intel.com header.s=Intel header.b=Bv9uqniM; 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 E9D523858035 for ; Tue, 7 Nov 2023 02:28:02 +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 [192.55.52.120]) by sourceware.org (Postfix) with ESMTPS id B7488385841B for ; Tue, 7 Nov 2023 02:27:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B7488385841B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B7488385841B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.55.52.120 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699324059; cv=none; b=Zenb5YeTUxDZIqHIJIgfEETsnV4VNCDd0P7inK/WLJxFvWYPYFXL45Brr7hLh716IvI86nMKjClu31sDEUA0g73Ga2txye3M+F9NDlNo3n2I/aD27Jjk6FJBEfQkrDgj6wfC57ViugjLprvIL5pAXFbBYN3GS5QeeNrLaVRnVjw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699324059; c=relaxed/simple; bh=GgW0HtOYVOsT1POwLaw+ewyaxo9XBmpzUpPED+F6Nko=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=SlFiW6zDoJJ6S1qfmuBS6hQItu53eh0KkMN4f8JSlKuMrkJnPOxw2rTWSEc4Ab1lLX/xoJ4Lwvv8vZ8GBFiW6vIBUwmWFX84760rwXcwhWzPT+0frwJlJ2McX0cd6cjmFVKvRSyeoQe7lwZ0f574B9pgKnS65ushK3w4vxX4z6Y= 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=1699324057; x=1730860057; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=GgW0HtOYVOsT1POwLaw+ewyaxo9XBmpzUpPED+F6Nko=; b=Bv9uqniMTBePGgVHRyWeiCeu7KGpGTczgP0qKDb0BtkJTzIg8BLITfAI 9bP3frcOdPOnse07nntOQvsero+6Jcp/x6bPv1wS9ZVJD3qjzaiLE9bgV vcTPIBpf0v53LnzkVf8DwtBVzZacv/IzYSrEnz8s/ej4tQsdbHWOgmZFX KXZwKaitEUj0JWicOqHkvaOM37Vc9auZsJgCUxLI0JzP4FhUFuE8AVAfj ptqpsq/LiSefB4V7FN3frsWtO0kBys3baJJpHzVI7EMvaaW5fC+tctXi0 Y4sy9ye1LslKlBk3N2P2LSCF91iYDiNg99fxQ32aTmRkrM2ZrjlGaMjep Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="388290993" X-IronPort-AV: E=Sophos;i="6.03,282,1694761200"; d="scan'208";a="388290993" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2023 18:27:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,282,1694761200"; d="scan'208";a="10257310" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by orviesa001.jf.intel.com with ESMTP; 06 Nov 2023 18:27:35 -0800 Received: from shliclel4217.sh.intel.com (shliclel4217.sh.intel.com [10.239.240.127]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 17B141005717; Tue, 7 Nov 2023 10:27:34 +0800 (CST) From: Haochen Jiang To: gcc-patches@gcc.gnu.org Cc: hongtao.liu@intel.com, ubizjak@gmail.com Subject: [PATCH] i386: Fix isa attribute for TI/TF andnot mode Date: Tue, 7 Nov 2023 10:27:34 +0800 Message-Id: <20231107022734.368277-1-haochen.jiang@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_NONE, 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781870450107414473 X-GMAIL-MSGID: 1781870450107414473 Hi all, This patch aims fo fix the wrong isa attribute which caused regression on PR111907. Regtested on x86_64-pc-linux-gnu. Ok for trunk? Thx, Haochen gcc/ChangeLog: PR target/111907 * config/i386/i386.md (avx_noavx512vl): Add missing definition. * config/i386/sse.md (*andnot3): Change isa attribute from avx_noavx512f to avx_noavx512vl. gcc/testsuite/ChangeLog: PR target/111907 * gcc.target/i386/pr111907.c: New test. --- gcc/config/i386/i386.md | 2 ++ gcc/config/i386/sse.md | 2 +- gcc/testsuite/gcc.target/i386/pr111907.c | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr111907.c diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index ecc74e9994e..8f2f6e5d908 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -919,6 +919,8 @@ (eq_attr "isa" "avx") (symbol_ref "TARGET_AVX") (eq_attr "isa" "avx_noavx512f") (symbol_ref "TARGET_AVX && !TARGET_AVX512F") + (eq_attr "isa" "avx_noavx512vl") + (symbol_ref "TARGET_AVX && !TARGET_AVX512VL") (eq_attr "isa" "noavx") (symbol_ref "!TARGET_AVX") (eq_attr "isa" "avx2") (symbol_ref "TARGET_AVX2") (eq_attr "isa" "noavx2") (symbol_ref "!TARGET_AVX2") diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index e6a5c7911d5..33198756bb0 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -5169,7 +5169,7 @@ output_asm_insn (buf, operands); return ""; } - [(set_attr "isa" "noavx,avx_noavx512f,avx512vl,avx512f_512") + [(set_attr "isa" "noavx,avx_noavx512vl,avx512vl,avx512f_512") (set_attr "addr" "*,gpr16,*,*") (set_attr "type" "sselog") (set (attr "prefix_data16") diff --git a/gcc/testsuite/gcc.target/i386/pr111907.c b/gcc/testsuite/gcc.target/i386/pr111907.c new file mode 100644 index 00000000000..5275e9400ed --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr111907.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx512f -mno-evex512" } */ + +_Float128 +foo (_Float128 d, _Float128 e) +{ + return __builtin_copysignf128 (d, e); +}