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: 1857355 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=E5e5chXw; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SKL8Y4CX7z1yQ4 for ; Tue, 31 Oct 2023 17:39:25 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6E99638582B0 for ; Tue, 31 Oct 2023 06:39:23 +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+incoming=patchwork.ozlabs.org@gcc.gnu.org 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