From patchwork Sat Feb 15 15:26:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1238550 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-519592-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=oVvXc9r8; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=QcooWA/j; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48KYy46w70z9sP7 for ; Sun, 16 Feb 2020 02:26:52 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; q=dns; s=default; b=FC5 UAlb4OQ2HC3/6jnasKPgO9+eDCGOdC2r4EeDyAPRzJW6tH/IideKMugMhKG/aboi 7RRyS2JUWzUlnA26Eq/gESrOSXKzLXkOhe1qse1DspSryU1OM14qW4TqeI9J1ah+ hIc89bD2T4R8lPu/jkFl1K5j4jl1ynV6paAA8A1o= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=default; bh=mIPKUvkF7 MPDurjJL0RP4dYDIWg=; b=oVvXc9r8OT+fnRekQeoO8k0jLwYuO6YktTT6cbB+U A5RZKM0la2d82LIJTMTOt/UMafmdyxzxL56fD6TCtHe70EC7A4tjoE6rpnEbYWY4 QHbdXVzjRL/B+n+q26x48GzR9R5LO3lvWpbA65H7bLIZ7LIofyJkNMIpQZrwF2nD HU= Received: (qmail 104959 invoked by alias); 15 Feb 2020 15:26:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 104911 invoked by uid 89); 15 Feb 2020 15:26:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=89229, HContent-Transfer-Encoding:8bit X-HELO: mail-pf1-f172.google.com Received: from mail-pf1-f172.google.com (HELO mail-pf1-f172.google.com) (209.85.210.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 15 Feb 2020 15:26:32 +0000 Received: by mail-pf1-f172.google.com with SMTP id x185so6556682pfc.5 for ; Sat, 15 Feb 2020 07:26:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gOoh480eHQWG2/0mxSaZ9f/RqG62Ct39V5xR0F6d7VQ=; b=QcooWA/j6sN0/zDh/bVEYtpFZEKKPKWSx9BuziK4bJtpt9fc4+v8+0Vvd+sUjLI9Ja 2g1Y89jDexAnlEperSaHJUQIPGd/r4PM2D0bXT+IEJR/wmcH1VfiF3qgXCkvIyENYr5O 8l5F4r7byLBxpm0krFnKu/9g5K2gWnS19QCR/nDfmmwGO38mUlm91Xfhr7RrCJv6jN0o zXb/VME0YWL0RJz09rEXv0ScPP1ATbIMHRYU2LOjn+rC3FKWmsL8wTO/4OCn0YJ42EJH ZCE9MF3DSZZ4qkeN1b/KRU1WiCR6EZ+RqZSTgrR2nFiAXGpwIuooEDj6ZxOcQ2lpas6d 4Evg== Received: from gnu-cfl-2.localdomain (c-73-93-86-59.hsd1.ca.comcast.net. [73.93.86.59]) by smtp.gmail.com with ESMTPSA id k2sm11252190pgk.84.2020.02.15.07.26.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Feb 2020 07:26:29 -0800 (PST) Received: from gnu-cfl-2.hsd1.ca.comcast.net (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 4F3E1C048F; Sat, 15 Feb 2020 07:26:28 -0800 (PST) From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Cc: Jakub Jelinek , Jeffrey Law , Jan Hubicka , Uros Bizjak Subject: [PATCH 03/10] i386: Use ix86_output_ssemov for OImode TYPE_SSEMOV Date: Sat, 15 Feb 2020 07:26:21 -0800 Message-Id: <20200215152628.32068-4-hjl.tools@gmail.com> In-Reply-To: <20200215152628.32068-1-hjl.tools@gmail.com> References: <20200215152628.32068-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-IsSubscribed: yes There is no need to set mode attribute to XImode since ix86_output_ssemov can properly encode ymm16-ymm31 registers with and without AVX512VL. PR target/89229 * config/i386/i386.md (*movoi_internal_avx): Call ix86_output_ssemov for TYPE_SSEMOV. Remove ext_sse_reg_operand and TARGET_AVX512VL check. --- gcc/config/i386/i386.md | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index b30e5a51edc..9e9b17d0913 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -1925,21 +1925,7 @@ (define_insn "*movoi_internal_avx" return standard_sse_constant_opcode (insn, operands); case TYPE_SSEMOV: - if (misaligned_operand (operands[0], OImode) - || misaligned_operand (operands[1], OImode)) - { - if (get_attr_mode (insn) == MODE_XI) - return "vmovdqu32\t{%1, %0|%0, %1}"; - else - return "vmovdqu\t{%1, %0|%0, %1}"; - } - else - { - if (get_attr_mode (insn) == MODE_XI) - return "vmovdqa32\t{%1, %0|%0, %1}"; - else - return "vmovdqa\t{%1, %0|%0, %1}"; - } + return ix86_output_ssemov (insn, operands); default: gcc_unreachable (); @@ -1948,15 +1934,7 @@ (define_insn "*movoi_internal_avx" [(set_attr "isa" "*,avx2,*,*") (set_attr "type" "sselog1,sselog1,ssemov,ssemov") (set_attr "prefix" "vex") - (set (attr "mode") - (cond [(ior (match_operand 0 "ext_sse_reg_operand") - (match_operand 1 "ext_sse_reg_operand")) - (const_string "XI") - (and (eq_attr "alternative" "1") - (match_test "TARGET_AVX512VL")) - (const_string "XI") - ] - (const_string "OI")))]) + (set_attr "mode" "OI")]) (define_insn "*movti_internal" [(set (match_operand:TI 0 "nonimmediate_operand" "=!r ,o ,v,v ,v ,m,?r,?Yd")