From patchwork Mon Jul 29 06:38:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haochen Jiang X-Patchwork-Id: 1965841 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=eM7PFeJT; 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 4WXTJb5h8Qz1ybY for ; Mon, 29 Jul 2024 16:40:46 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7C3B03858416 for ; Mon, 29 Jul 2024 06:40:44 +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.198.163.13]) by sourceware.org (Postfix) with ESMTPS id 42F8D385840A for ; Mon, 29 Jul 2024 06:40:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 42F8D385840A 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 42F8D385840A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.13 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722235224; cv=none; b=m267UQltzLp6NoX1s4u0vmGq1s4no/LLyRl4VaqgdCRndObs3SGsA9apkT8XQxOiiBeQMHPN+4iDh18TilgWtMZo0scsYUMWD9wfAMbJQ7Pccxt9KpGGSfVzJeVXAwzvFftfRaw/PzCCSty0mpaaXcGEN7KMYhHl7du60Wvt63g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722235224; c=relaxed/simple; bh=saSIug8SkhDSgA813U1pWyiqzzPq7YNeXIDNZhQtF8o=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=W6BbhnJkeb64XkfEupqZd5Ghq7OnV/j4r+L2WXT+rkhvkJZOwXxmWuNm/h8ncb6wUHHfXb7EXZ75n1a1wTxtvKxh5CNxrD8gRPP+jGP4Hk8PVoF7ZwC+CceYmHl6nvG9EnFKoFv9Euc/mhFi1YGXNAexkSz2S1/8+RhpQ6SBlwQ= 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=1722235221; x=1753771221; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=saSIug8SkhDSgA813U1pWyiqzzPq7YNeXIDNZhQtF8o=; b=eM7PFeJToRHYQ8PuNXrXSJfdZ1xKnrcgvQVj7h2n0iyqtsWo2fZaFulr 5eliCp9KbZrO5ziHEji0K/QEss8GO4iwqqkHgBh3LiDvktM0JPuQQ+jZ6 5Fq1k17ze62wDCUW/Z+OfcAQ3j/MxmVVk5VDTYhUbiZkBpXEMEEWW10e5 NigxoYNxmZwkpFk9KxA/ROwtTHnhXosl7gRDg9d3nnj03TM+WVjc5qMZk Mggwiq2T36PsIJRa7t6CeWDghxf9OBs+vTWUbTurYFtKWl4wE+OtjlfCB 3or/v+JwCwH4GWFIMFds6eEO5q3gLGCYAE10GwMCgLPkNGjYkkh6KuFen g==; X-CSE-ConnectionGUID: mfxi9J0uSfyV2BAa0B6HxQ== X-CSE-MsgGUID: ris9gE6aQG6ALbpxxyM8vw== X-IronPort-AV: E=McAfee;i="6700,10204,11147"; a="22876915" X-IronPort-AV: E=Sophos;i="6.09,245,1716274800"; d="scan'208";a="22876915" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2024 23:40:20 -0700 X-CSE-ConnectionGUID: fW3aZ+tPT86PyzEJJvo+CQ== X-CSE-MsgGUID: IGO++XkyR/qz7Ssz1Euaaw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,245,1716274800"; d="scan'208";a="53962383" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by fmviesa010.fm.intel.com with ESMTP; 28 Jul 2024 23:40:18 -0700 Received: from shliclel4217.sh.intel.com (shliclel4217.sh.intel.com [10.239.240.127]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 1C2D81005689; Mon, 29 Jul 2024 14:40:18 +0800 (CST) From: Haochen Jiang To: gcc-patches@gcc.gnu.org Cc: hongtao.liu@intel.com, ubizjak@gmail.com Subject: [GCC12/13 PATCH] i386: Use _mm_setzero_ps/d instead of _mm_avx512_setzero_ps/d for GCC13/12 Date: Mon, 29 Jul 2024 14:38:18 +0800 Message-Id: <20240729063818.2987201-1-haochen.jiang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, SPF_HELO_NONE, SPF_NONE, TXREP 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, In GCC13/12, there is no _mm_avx512_setzero_ps/d since it is introduced in GCC14. Fix the backport issue as obvious in: https://gcc.gnu.org/pipermail/gcc-regression/2024-July/080385.html Thx, Haochen gcc/ChangeLog: * config/i386/avx512dqintrin.h (_mm_reduce_round_sd): Use _mm_setzero_pd instead of _mm_avx512_setzero_pd. (_mm_reduce_round_ss): Use _mm_setzero_ps instead of _mm_avx512_setzero_ps. --- gcc/config/i386/avx512dqintrin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/i386/avx512dqintrin.h b/gcc/config/i386/avx512dqintrin.h index 4383ff14670..82f4acc7d2e 100644 --- a/gcc/config/i386/avx512dqintrin.h +++ b/gcc/config/i386/avx512dqintrin.h @@ -2840,7 +2840,7 @@ _mm512_fpclass_ps_mask (__m512 __A, const int __imm) #define _mm_reduce_round_sd(A, B, C, R) \ ((__m128d) __builtin_ia32_reducesd_mask_round ((__v2df)(__m128d)(A), \ - (__v2df)(__m128d)(B), (int)(C), (__v2df) _mm_avx512_setzero_pd (), \ + (__v2df)(__m128d)(B), (int)(C), (__v2df) _mm_setzero_pd (), \ (__mmask8)(-1), (int)(R))) #define _mm_mask_reduce_round_sd(W, U, A, B, C, R) \ @@ -2869,7 +2869,7 @@ _mm512_fpclass_ps_mask (__m512 __A, const int __imm) #define _mm_reduce_round_ss(A, B, C, R) \ ((__m128) __builtin_ia32_reducess_mask_round ((__v4sf)(__m128)(A), \ - (__v4sf)(__m128)(B), (int)(C), (__v4sf) _mm_avx512_setzero_ps (), \ + (__v4sf)(__m128)(B), (int)(C), (__v4sf) _mm_setzero_ps (), \ (__mmask8)(-1), (int)(R))) #define _mm_mask_reduce_round_ss(W, U, A, B, C, R) \