From patchwork Thu Oct 10 03:46:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hu, Lin1" X-Patchwork-Id: 1995214 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=Q1XlRXbM; 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 4XPFzr1XCBz1xsv for ; Thu, 10 Oct 2024 14:46:30 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8ADC2385E44D for ; Thu, 10 Oct 2024 03:46:27 +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.17]) by sourceware.org (Postfix) with ESMTPS id A00E6385DDC4 for ; Thu, 10 Oct 2024 03:46:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A00E6385DDC4 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 A00E6385DDC4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728531969; cv=none; b=sjSBbfxKX8Rsj0yl+bME1zG/0MEJAKXeAJV+0NioTwJacncIZVjEJ0ANBLi1RCv4UfqzHAHBCM1Yf1pjqI0qPO2j8odcRDJc20ihZHU6k6LUUhCgymefkQcegr/HQ4XJ69hD1+myVp4JbSlInYFQ/tX7UXSWPOHpGzl56zdoW6o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728531969; c=relaxed/simple; bh=Jygcw5gpoDEg+NRX5ksapUHTbasF7TFrPHwsd2xP69c=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=PXSQzGwDMD5XhD8hcOeFcUSK7Yx181Ikl7x1A76Lz8WH4h8w5a3Nc1RouGre7iP2mPfbEvJmxTnuxUE6IducfxYeO38sUaZ82spSuBj+7Mrdo6me/QVdZNCehLyd1krvEHZypq3UNn9h8UvQ4ugxoDsqBI0pvTl4dtoxqf0QaMU= 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=1728531967; x=1760067967; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Jygcw5gpoDEg+NRX5ksapUHTbasF7TFrPHwsd2xP69c=; b=Q1XlRXbMwDsRa/cP/wnx5GP2wsJpxOGKzlshfA7P5eLkB2Lr2eQ1F5zi WrLxtXRp6nCpxaKBruWx4iKWTVlKbrZP5ccDU/rS5eP9BQ1tGGvfGrVHm jRhIax3bEYJZ0hWaOSRGOOdP/gblJzK37u+9PRR6eQvoBXTZWAPONuYjh zWGCHmGU1IYJQG0RPq6wm0Ja6lnl72sHlF/3cVHHRNZNZlRL9GgfkxT3X lFCuzfvj3TTM7pgqoRFgOH2+auTsStf9fHGEs20Uu2Fyk1OKwvSNCVeAD jzbR3EaUDiG+zh8wGTPU5W30DCIi6ifleO9ib0hSRyu9DwmHJ7R1XHJI1 Q==; X-CSE-ConnectionGUID: oJcH14iQT46lSPLMRQgqkw== X-CSE-MsgGUID: Vaf/dh65QVmKjk4kfCAViQ== X-IronPort-AV: E=McAfee;i="6700,10204,11220"; a="27747087" X-IronPort-AV: E=Sophos;i="6.11,191,1725346800"; d="scan'208";a="27747087" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2024 20:46:05 -0700 X-CSE-ConnectionGUID: spE02Xx1RN2RxJ92TgX1ng== X-CSE-MsgGUID: 3DLOfAWuQFamwQcPdLYXSA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,191,1725346800"; d="scan'208";a="76546690" Received: from shliclel4217.sh.intel.com ([10.239.240.127]) by fmviesa008.fm.intel.com with ESMTP; 09 Oct 2024 20:46:04 -0700 From: "Hu, Lin1" To: gcc-patches@gcc.gnu.org Cc: hongtao.liu@intel.com, ubizjak@gmail.com Subject: [PATCH] i386: Fix some patterns's mem attribute. Date: Thu, 10 Oct 2024 11:46:03 +0800 Message-Id: <20241010034603.31847-1-lin1.hu@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 This is another patch to modify some pattern's type attr from ssemov to ssemov2. Some ssemov pattern's mem attr should be load when their 2 operand is a memory operand. Bootstrapped and regtested on x86-64-linux-pc, OK for trunk? BRs, Lin gcc/ChangeLog: * config/i386/sse.md (sse_movhlps): Change type attr from ssemov to ssemov2. (sse_loadhps): Ditto. (*vec_concat): Ditto. (vec_setv2df_0): Ditto. (sse_loadlps): Change attr from ssemov to ssemov2 except for 2, 3. (sse2_loadhps): Change attr from ssemov to ssemov2 except for 0, 1. (sse2_loadlpd): Change attr from ssemov to ssemov2 except for 0, 1, 2. (sse2_movsd_): Change attr from ssemov to ssemov2 except for 5. (vec_concatv2df): Change attr from ssemov to ssemov2 except for 0, 1, 2. (*vec_concat): Change attr from ssemov to ssemov2 for 3, 4. (vec_concatv2di): Change attr from ssemov to ssemov2 except for 0, 1, 2, 3, 4, 5. --- gcc/config/i386/sse.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index ccef3e063ec..a45b50ad732 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -10995,7 +10995,7 @@ (define_insn "sse_movhlps" vmovlps\t{%H2, %1, %0|%0, %1, %H2} %vmovhps\t{%2, %0|%q0, %2}" [(set_attr "isa" "noavx,avx,noavx,avx,*") - (set_attr "type" "ssemov") + (set_attr "type" "ssemov2") (set_attr "prefix" "orig,maybe_evex,orig,maybe_evex,maybe_vex") (set_attr "mode" "V4SF,V4SF,V2SF,V2SF,V2SF")]) @@ -11557,7 +11557,7 @@ (define_insn "sse_loadhps" vmovlhps\t{%2, %1, %0|%0, %1, %2} %vmovlps\t{%2, %H0|%H0, %2}" [(set_attr "isa" "noavx,avx,noavx,avx,*") - (set_attr "type" "ssemov") + (set_attr "type" "ssemov2") (set_attr "prefix" "orig,maybe_evex,orig,maybe_evex,maybe_vex") (set_attr "mode" "V2SF,V2SF,V4SF,V4SF,V2SF")]) @@ -11610,7 +11610,7 @@ (define_insn "sse_loadlps" vmovlps\t{%2, %1, %0|%0, %1, %q2} %vmovlps\t{%2, %0|%q0, %2}" [(set_attr "isa" "noavx,avx,noavx,avx,*") - (set_attr "type" "sseshuf,sseshuf,ssemov,ssemov,ssemov") + (set_attr "type" "sseshuf,sseshuf,ssemov2,ssemov2,ssemov") (set (attr "length_immediate") (if_then_else (eq_attr "alternative" "0,1") (const_string "1") @@ -11766,7 +11766,7 @@ (define_insn "*vec_concat" movhps\t{%2, %0|%0, %q2} vmovhps\t{%2, %1, %0|%0, %1, %q2}" [(set_attr "isa" "noavx,avx,noavx,avx") - (set_attr "type" "ssemov") + (set_attr "type" "ssemov2") (set_attr "prefix" "orig,maybe_evex,orig,maybe_evex") (set_attr "mode" "V4SF,V4SF,V2SF,V2SF")]) @@ -12214,7 +12214,7 @@ (define_insn "vec_setv2df_0" movlpd\t{%2, %0|%0, %2} vmovlpd\t{%2, %1, %0|%0, %1, %2}" [(set_attr "isa" "noavx,avx,noavx,avx") - (set_attr "type" "ssemov") + (set_attr "type" "ssemov2") (set_attr "mode" "DF")]) (define_expand "vec_set" @@ -14665,7 +14665,7 @@ (define_insn "sse2_loadhpd" # #" [(set_attr "isa" "noavx,avx,noavx,avx,*,*,*") - (set_attr "type" "ssemov,ssemov,sselog,sselog,ssemov,fmov,imov") + (set_attr "type" "ssemov2,ssemov2,sselog,sselog,ssemov,fmov,imov") (set (attr "prefix_data16") (if_then_else (eq_attr "alternative" "0") (const_string "1") @@ -14735,6 +14735,8 @@ (define_insn "sse2_loadlpd" (const_string "fmov") (eq_attr "alternative" "10") (const_string "imov") + (eq_attr "alternative" "0,1,2") + (const_string "ssemov2") ] (const_string "ssemov"))) (set (attr "prefix_data16") @@ -14787,7 +14789,7 @@ (define_insn "sse2_movsd_" (if_then_else (eq_attr "alternative" "5") (const_string "sselog") - (const_string "ssemov"))) + (const_string "ssemov2"))) (set (attr "prefix_data16") (if_then_else (and (eq_attr "alternative" "2,4") @@ -14859,7 +14861,7 @@ (define_insn "vec_concatv2df" (if_then_else (eq_attr "alternative" "0,1,2") (const_string "sselog") - (const_string "ssemov"))) + (const_string "ssemov2"))) (set (attr "prefix_data16") (if_then_else (eq_attr "alternative" "3") (const_string "1") @@ -21545,7 +21547,7 @@ (define_insn "*vec_concat" movhps\t{%2, %0|%0, %q2} vmovhps\t{%2, %1, %0|%0, %1, %q2}" [(set_attr "isa" "sse2_noavx,avx,noavx,noavx,avx") - (set_attr "type" "sselog,sselog,ssemov,ssemov,ssemov") + (set_attr "type" "sselog,sselog,ssemov,ssemov2,ssemov2") (set_attr "prefix" "orig,maybe_evex,orig,orig,maybe_evex") (set_attr "mode" "TI,TI,V4SF,V2SF,V2SF")]) @@ -21653,7 +21655,7 @@ (define_insn "vec_concatv2di" (if_then_else (eq_attr "alternative" "0,1,2,3,4,5") (const_string "sselog") - (const_string "ssemov"))) + (const_string "ssemov2"))) (set (attr "addr") (if_then_else (eq_attr "alternative" "0,1") (const_string "gpr16")