From patchwork Wed Jun 14 01:47:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liuhongt X-Patchwork-Id: 1794799 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=y3OrA5V2; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QgpL70d8Fz20QH for ; Wed, 14 Jun 2023 11:51:09 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ED13A3858414 for ; Wed, 14 Jun 2023 01:51:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED13A3858414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686707464; bh=KVxNDruYSSD7LsXUO/2mYuwdvUQn7ijrlrHbYVy9+AM=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=y3OrA5V2r4qWv7FXJGi90pNJ6/TkzC6Jw71jY2pvKVqFOPdATYs/I2tZ090vauEah 7za7xZcn/EWLscn4yN1D/IXdPiZCCZWQF8IsGLW/0sO+P6llL0yUQO0pxqYs23PAQ2 5Z89cetmrwiCfKgVce8JvXfm0Lwyy7bukgOfd5OE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by sourceware.org (Postfix) with ESMTPS id 9A20A3858D38 for ; Wed, 14 Jun 2023 01:50:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9A20A3858D38 X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="361866747" X-IronPort-AV: E=Sophos;i="6.00,241,1681196400"; d="scan'208";a="361866747" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2023 18:49:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="689230993" X-IronPort-AV: E=Sophos;i="6.00,241,1681196400"; d="scan'208";a="689230993" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by orsmga006.jf.intel.com with ESMTP; 13 Jun 2023 18:49:56 -0700 Received: from shliclel4217.sh.intel.com (shliclel4217.sh.intel.com [10.239.240.127]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 7F3BF1005134; Wed, 14 Jun 2023 09:49:55 +0800 (CST) To: gcc-patches@gcc.gnu.org Cc: crazylht@gmail.com, hjl.tools@gmail.com Subject: [PATCH] [x86] Use x instead of v for alternative 2 (v, BH) in mov_internal. Date: Wed, 14 Jun 2023 09:47:55 +0800 Message-Id: <20230614014755.634006-1-hongtao.liu@intel.com> X-Mailer: git-send-email 2.39.1.388.g2fc9e9ca3c MIME-Version: 1.0 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_INVALID, DKIM_SIGNED, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, NO_DNS_FOR_FROM, TXREP, T_SCC_BODY_TEXT_LINE, T_SPF_HELO_TEMPERROR, T_SPF_TEMPERROR 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: liuhongt via Gcc-patches From: liuhongt Reply-To: liuhongt Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Since there's no evex version for vpcmpeq ymm, ymm, ymm. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready to push to trunk and backport to GCC13. gcc/ChangeLog: PR target/110227 * config/i386/sse.md (mov_internal>): Use x instead of v for alternative 2 since there's no evex version for vpcmpeqd ymm, ymm, ymm. gcc/testsuite/ChangeLog: * gcc.target/i386/pr110227.c: New test. --- gcc/config/i386/sse.md | 2 +- gcc/testsuite/gcc.target/i386/pr110227.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr110227.c diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 9bec09d354a..370ea6418a6 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -1324,7 +1324,7 @@ (define_expand "mov" (define_insn "mov_internal" [(set (match_operand:VMOVE 0 "nonimmediate_operand" - "=v,v ,v,v ,m") + "=v,v ,x,v ,m") (match_operand:VMOVE 1 "nonimmediate_or_sse_const_operand" " C,,BH,vm,v"))] "TARGET_SSE diff --git a/gcc/testsuite/gcc.target/i386/pr110227.c b/gcc/testsuite/gcc.target/i386/pr110227.c new file mode 100644 index 00000000000..9b59f5b6e49 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr110227.c @@ -0,0 +1,11 @@ +/* { dg-do assemble { target { ! ia32 } } } */ +/* { dg-options " -O2 -mavx512vl" } */ + +#include + +void f() +{ + __m256i mask = _mm256_set_epi32(0, 0, 0, 0, -1, -1, -1, -1); + register __m256i reg asm("xmm16") = mask; + asm(""::"v"(reg)); +}