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: 107653 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp940226vqr; Tue, 13 Jun 2023 18:51:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51RhMRl9CNhH+/NvvVPD+XTnSZV0+JE1YF+DRLksR7KRFzufIhRUXTQvSdhkMeYcZ/vje4 X-Received: by 2002:a05:6402:40c7:b0:511:c3f7:fa1a with SMTP id z7-20020a05640240c700b00511c3f7fa1amr167493edb.15.1686707489479; Tue, 13 Jun 2023 18:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686707489; cv=none; d=google.com; s=arc-20160816; b=kI5KTEqg6YLouqsVn9pQ/3w39xsILuMYYAC7EfHW5g+u35QzOzV9hPnBgN0QGSrAnD GYuUAnlPezzAct4WHatdZeUWN8I1he6+17ohZrH64ibdl+UZWHVY2dLDVaR9VcTCHLE8 K6pCODmUfs+xPtsntuoOFjTcfnWfPS740m057yy7ArQAum1aetfuj+bQCKaBxYHjblbd D1pBUzf+QpUr4NzuJpy8B7+7/StJLGBqsrgegT+MiHjizJwqn8yDuhP3CXeo2uWBSqPi TIZLIiAWIg/xEpg98aEVEGBcnOtR0lYaus7PTen7RKLqsvG8og+8OKv+LIzt0X9ebLJg P8Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=KVxNDruYSSD7LsXUO/2mYuwdvUQn7ijrlrHbYVy9+AM=; b=Kv1KCKWfTZb6nAArFilrEl4UDsFnXkTmDb0ods9Clr8nzkSDVKXdsbFlbk4OhozlJk rLYNFtA8j43mGnG2yhbcwxdQw4HUocKp233yjxQj4SPOnZ6bW5r5AqUnA7RTrUxKGu7U BaJBgibg7eEMcuYnjV9fp/ovR0lcD7eoPgckA+j8DnB4BmoFNazauiq6v7+8p4f4yrEu A4zEg6DEUYcjGikkuFDb2KDniYSacj59unABplCrkKNyLhVYUYS4nHmKI8S8IJ1TtABD Mg805xAGjTPEJ1dvpOFg4t4ikHXagF8+nlRKwQk6yiwNY3AN14xFh2YAUrddsYoYDHCm HyBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=MXO9oQsZ; 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=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id r8-20020aa7d148000000b00514a6a6fad0si8824482edo.311.2023.06.13.18.51.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 18:51:29 -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=@gcc.gnu.org header.s=default header.b=MXO9oQsZ; 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=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9A5773858422 for ; Wed, 14 Jun 2023 01:51:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A5773858422 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686707487; 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=MXO9oQsZQhVAU1rO0hP0tfe1JBI3MKobAh2s4bRe0Q/chOzgLkhMQCTRXWrChTVgP 94WBlP+DMAbwyUWlQOpn9uksi8hIjW42l85Qp7aNut/X5oGOSQJIDuD7o6vTd03RCQ rcM0oq/KM0sKNJaLHRcyGY9QsyZCRitmQhHyXbpY= 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768640992677341328?= X-GMAIL-MSGID: =?utf-8?q?1768640992677341328?= 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)); +}