From patchwork Sun Feb 10 00:19:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1039337 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-495669-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.b="iLQb+YS9"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dIYgysYU"; 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 43xqQz3c4Dz9sMp for ; Sun, 10 Feb 2019 11:23:55 +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=fiH GC2ze1bWB7fal+UVjNUUXXMA402wbsJFmuyywb2PRFxVU2OL2n8Ueh0xZ/obyyVV IHXZJyNO6ay1QVTYGf7SSrVKObbcQYNCdt42nbjqprnzaZxfc5Q2+ia2KrANF+1K 5jMUheEetbvkiCE4B8Winkoa7N2ebmPA6ypoYwXY= 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=N8h9zF5du scUwVF+UHUccNm1Vz8=; b=iLQb+YS9auoH7WwYbzPhoVyM2qyyN+UweuBmnxpXz FjCOOl3PGI9sR3plYAAD25XkQ1DhJ/yXHMfooadm3haHJqrHOeYR7pDFlu5IpJQB QDnoAN7w8evs++ts51Mn59YN43IHX88HcpROa+CtghsgJD7NG1b6UutoO0rXPZqR QY= Received: (qmail 125001 invoked by alias); 10 Feb 2019 00:20:21 -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 122827 invoked by uid 89); 10 Feb 2019 00:20:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=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.2 spammy=HX-Received:8182, HContent-Transfer-Encoding:8bit X-HELO: mail-pg1-f182.google.com Received: from mail-pg1-f182.google.com (HELO mail-pg1-f182.google.com) (209.85.215.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 10 Feb 2019 00:20:03 +0000 Received: by mail-pg1-f182.google.com with SMTP id z11so3258833pgu.0 for ; Sat, 09 Feb 2019 16:20:03 -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=D3Dhrp2/mhiYDgM/ribcIa4lNOEA4rAvL0aSNGwCEOk=; b=dIYgysYU/yv57btntmd/V++Rk75T+7w9OPwL9qzMGCaCRKuF5xViw7+e/9qkjjtLFR KJpO613R+1AFfJnKaswQzF4akomj1sKqJVkZHSBwBPAjZAAZNP8Ce/4l92nfahpSpLZA JaYSvkJU6+on/N2L7k1iMgbAMSM/b6ir4g9fHPLh9jt92WyQQknxeOidFzTIiUgIifBG 5qprOaR/FK+mWbATPcUKa774PN+9IcV6MDXIlqsSPxMZfKtQmDrstMkYWDSqHSaFQbPR hREvE2m0q6+4TTqHMyihDNuf7EHZNZDR7bBpeo+hjfLsVaH6pVB9FwlBehAWs2ZRiMrU Yn6A== 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 c23sm10359323pfe.156.2019.02.09.16.19.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Feb 2019 16:19:59 -0800 (PST) Received: from gnu-cfl-2.hsd1.ca.comcast.net (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 6CDD4C031C; Sat, 9 Feb 2019 16:19:49 -0800 (PST) From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Cc: Uros Bizjak Subject: [PATCH 34/43] i386: Emulate MMX abs2 with SSE Date: Sat, 9 Feb 2019 16:19:38 -0800 Message-Id: <20190210001947.27278-35-hjl.tools@gmail.com> In-Reply-To: <20190210001947.27278-1-hjl.tools@gmail.com> References: <20190210001947.27278-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-IsSubscribed: yes Emulate MMX abs2 with SSE. Only SSE register source operand is allowed. PR target/89021 * config/i386/sse.md (abs2): Add SSE emulation. --- gcc/config/i386/sse.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index e0ea8ab300b..018b1dca984 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -16092,16 +16092,19 @@ }) (define_insn "abs2" - [(set (match_operand:MMXMODEI 0 "register_operand" "=y") + [(set (match_operand:MMXMODEI 0 "register_operand" "=y,Yv") (abs:MMXMODEI - (match_operand:MMXMODEI 1 "nonimmediate_operand" "ym")))] - "TARGET_SSSE3" - "pabs\t{%1, %0|%0, %1}"; - [(set_attr "type" "sselog1") + (match_operand:MMXMODEI 1 "nonimmediate_operand" "ym,Yv")))] + "(TARGET_MMX || TARGET_MMX_WITH_SSE) && TARGET_SSSE3" + "@ + pabs\t{%1, %0|%0, %1} + %vpabs\t{%1, %0|%0, %1}" + [(set_attr "mmx_isa" "native,x64") + (set_attr "type" "sselog1") (set_attr "prefix_rep" "0") (set_attr "prefix_extra" "1") (set (attr "prefix_rex") (symbol_ref "x86_extended_reg_mentioned_p (insn)")) - (set_attr "mode" "DI")]) + (set_attr "mode" "DI,TI")]) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;