From patchwork Tue Oct 31 06:36:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiang, Haochen" X-Patchwork-Id: 16082 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b90f:0:b0:403:3b70:6f57 with SMTP id t15csp47801vqg; Mon, 30 Oct 2023 23:39:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGMWT+QL/BZ7nkdYS3y846jzcJnJz5Cy1xsh0SbQtgF8J5BwFGW1aABafAqQrkGH0B7dqxS X-Received: by 2002:a05:620a:4805:b0:774:1082:a249 with SMTP id eb5-20020a05620a480500b007741082a249mr12269610qkb.57.1698734375899; Mon, 30 Oct 2023 23:39:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698734375; cv=pass; d=google.com; s=arc-20160816; b=C8pGD67Pxt5qer0BrGcU3E4FHHOdgHw3YN3CiWafECxUGmRE+xUHAy/lU+oZk7+k/f gpVaR+zjnrqcFabqls3/+pdKTTQuP7Z09b9YjVCiacrVrXw2mXmV6kz82UXpIoiyK+yn OAElYX7+qjMuVH4RluLmX1P0Njrck3Iz3m0KLEPtWMKOtsOmf0ioBZCXaLCqkpeRwZ+j DYpAUFW4F4WZ4JJUT0IPlmG6kSzHp8Q8jXAWiSOHC4nVHfdLF0vTa6AmpylG9Xfub7Ji opUrz6nYYgRzoCLR8FPeqP4eeUQ9zLq7wm/m0tChrbFztx7chhHPQN8p1kQqguOjTIJV QvJg== 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=ODCW3yxQX50/C29wQjWT+uEKomg57F/J4CxjwdrvM6s=; fh=n8eNxIWSYJwy/CU3QSXzDvE/zeEoomCGojuOcYEQEyQ=; b=e7iyeWAfKup4X0eqi8Fyq/jQGXahWb2SyyILYd3hyikvtu2CKtQZhNmDtUQxtroNos AT5R/eNG8npUtkrgzVfQNs+GIWHIg4UJFelNU0312RjxV293hCxl7MmQyg6kd0ZNMWSW eMD9SiciAuFVHXH2Ub/M/Z5G8LfHM8KXxecLEQ4E5jIisMDNfeM6FIv+MqlMYaumEV0j cjMZR5sgI5ecjKxm134XyyCSCVuHYHpRA3sqCYzEC3dAGKwmluEB+9BHVMgeCI5j5a6f PuipGWF+alG75PujWQZ0fFwclGC3lbsQWJ3hb1j/pwUwvdZu6oJoXwgRydgrCiUVvH3b jisA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=E5e5chXw; arc=pass (i=1); 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id rd12-20020a05620a8dcc00b0076d8dff9b96si500838qkn.734.2023.10.30.23.39.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 23:39:35 -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=pass header.i=@intel.com header.s=Intel header.b=E5e5chXw; arc=pass (i=1); 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"; 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 AADCE3858438 for ; Tue, 31 Oct 2023 06:39:35 +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 9212B3858D20 for ; Tue, 31 Oct 2023 06:39:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9212B3858D20 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 9212B3858D20 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=1698734351; cv=none; b=Y26wQk7a43I95lseQ5xDCxdGjZhjbPXuDcyYLGBV6E96OG4t8nI7c2plZI0T5dCOxadmmtQ6SsMbJ4l601f7z0tefSCgqALc7iIbjiImzKUOiBdjkc19dA/Xp5/R+mlx2Jz60S5IsYrVUxBBhJe0V3R4KioylAgevYkI7qKTjJ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698734351; c=relaxed/simple; bh=S3BIxuqP5qJlWP/4J3glz8upNOgc9EIjvnbBKZvs62o=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=AjBxyPaeO/Nu8wCF0/+gZRk+FI9sXxyyBtqtjwtG1i48ypHbQU2OggfuJxBzQJ9yyx90lU5IIDQVfXUqacO+A1+x3r8iP5PTmyzMmlPcv7IKb/c2CTttzDD6ZsjZ36rjyPbkQHyz1uMo2ahQ2f6ritco00nFZ2O2LhV46DPNz8E= 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=1698734349; x=1730270349; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=S3BIxuqP5qJlWP/4J3glz8upNOgc9EIjvnbBKZvs62o=; b=E5e5chXwd7QwllZa8J70CVcNPzT9j8AM8OdStG5jHGmnbA57QkoPIAJc vSMBwz+EvZKxnKD352lMB5aMZGzMz6i31uUrBCTgATgIbJ7Kk8UqEvtt3 9wkio3PQHXUTwKMtwWRyOoouL+hl8mQvn3CU14a3pA6J/NI8RRWgzcVMm X6i9/NaV/xkGJmozT+Wa/JY5apgaHswz9KKQMRUZbWxFYFcOFd/ivb+g/ 1r7N89VqntkwhXPvDxeKiOkk8+H8NwqIBbMds2iJgY247f6dwwhXQADnF a4YYWt5F3oZPBHWHYmko9jCuNEzkr/mRstloNWWSvaqDlPVVqjSGc+Okd Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10879"; a="452498606" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="452498606" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2023 23:39:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="1696591" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by orviesa002.jf.intel.com with ESMTP; 30 Oct 2023 23:39:07 -0700 Received: from shliclel4217.sh.intel.com (shliclel4217.sh.intel.com [10.239.240.127]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 84E961005665; Tue, 31 Oct 2023 14:39:05 +0800 (CST) From: Haochen Jiang To: gcc-patches@gcc.gnu.org Cc: ubizjak@gmail.com, hongtao.liu@intel.com Subject: [PATCH 0/4] Fix no-evex512 function attribute Date: Tue, 31 Oct 2023 14:36:59 +0800 Message-Id: <20231031063703.2643896-1-haochen.jiang@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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: 1781252096523384769 X-GMAIL-MSGID: 1781252096523384769 Hi all, These four patches are going to fix no-evex512 function attribute. The detail of the issue comes following: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111889 My proposal for this problem is to also push "no-evex512" when defining 128/256 intrins in AVX512. Besides, I added some new intrins to support the current AVX512 intrins. The newly added _mm{,256}_avx512* intrins are duplicated from their _mm{,256}_* forms from AVX2 or before. We need to add them to prevent target option mismatch when calling AVX512 intrins implemented with these intrins under no-evex512 function attribute. All AVX512 intrins calling those AVX2 intrins or before will change their calls to these newly added AVX512 version. This will solve the problem when we are using no-evex512 attribute with AVX512 related intrins. But it will not solve target option mismatch when we are calling AVX2 intrins or before with no-evex512 function attribute since as mentioned in PR111889, it actually comes from a legacy issue. Therefore, we are not expecting that usage. Regtested on x86_64-pc-linux-gnu. Ok for trunk? Thx, Haochen