From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124721 invoked by alias); 10 Feb 2019 00:20:19 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 122708 invoked by uid 89); 10 Feb 2019 00:20:04 -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=HContent-Transfer-Encoding:8bit X-HELO: mail-pg1-f172.google.com Received: from mail-pg1-f172.google.com (HELO mail-pg1-f172.google.com) (209.85.215.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 10 Feb 2019 00:20:02 +0000 Received: by mail-pg1-f172.google.com with SMTP id z10so3243005pgp.7 for ; Sat, 09 Feb 2019 16:20:02 -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=se7O+TV/53sZShzAY7CcXFs0Mk28Aj4rxerIT+VLNGo=; b=H82tZfpqnJ+0kPIipfDaw6q/UmqyhOeV+vXWBEA9IoriN9fiNCjHlFxIpGCjGZlIyd HU9OPBmlaeOs1G8mKrfchh6+H2UEknEtYSawYwU8Z4tGthc7FVEl9e3smBgBDgfs5Y0G Kr2b7izKrgrnmPttdOxHmOxnNxD6gWcrfPOb8l1S3V27Z4OfuKJ/yH5uswZQmnEBPEMw 49L+ah4EgI1MEuYaDxmC8ECRkGFOJFY5FFykHDKKQ6sCxI6fVPWEd23gQBPkQ++ddAaj AB9soSUN8L4J1pAlUnnuq+wYvp0WFCbQXHg3I2xGzbPjZQTbn4HP4Rf2ncUEGuMC13xC VGLA== Return-Path: 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 b29sm2336273pff.34.2019.02.09.16.19.54 (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 B13FCC034B; Sat, 9 Feb 2019 16:19:48 -0800 (PST) From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Cc: Uros Bizjak Subject: [PATCH 20/43] i386: Emulate MMX mmx_umulv4hi3_highpart with SSE Date: Sun, 10 Feb 2019 00:20:00 -0000 Message-Id: <20190210001947.27278-21-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 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg00608.txt.bz2 Emulate MMX mmx_umulv4hi3_highpart with SSE. Only SSE register source operand is allowed. PR target/89021 * config/i386/mmx.md (*mmx_umulv4hi3_highpart): Add SSE emulation. --- gcc/config/i386/mmx.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index 0d00896127b..0e5bfe6baff 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -817,24 +817,29 @@ (zero_extend:V4SI (match_operand:V4HI 2 "nonimmediate_operand"))) (const_int 16))))] - "TARGET_SSE || TARGET_3DNOW_A" + "((TARGET_MMX || TARGET_MMX_WITH_SSE) && TARGET_SSE) + || TARGET_3DNOW_A" "ix86_fixup_binary_operands_no_copy (MULT, V4HImode, operands);") (define_insn "*mmx_umulv4hi3_highpart" - [(set (match_operand:V4HI 0 "register_operand" "=y") + [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yv") (truncate:V4HI (lshiftrt:V4SI (mult:V4SI (zero_extend:V4SI - (match_operand:V4HI 1 "nonimmediate_operand" "%0")) + (match_operand:V4HI 1 "nonimmediate_operand" "%0,0,Yv")) (zero_extend:V4SI - (match_operand:V4HI 2 "nonimmediate_operand" "ym"))) + (match_operand:V4HI 2 "nonimmediate_operand" "ym,x,Yv"))) (const_int 16))))] "(TARGET_SSE || TARGET_3DNOW_A) && ix86_binary_operator_ok (MULT, V4HImode, operands)" - "pmulhuw\t{%2, %0|%0, %2}" - [(set_attr "type" "mmxmul") - (set_attr "mode" "DI")]) + "@ + pmulhuw\t{%2, %0|%0, %2} + pmulhuw\t{%2, %0|%0, %2} + vpmulhuw\t{%2, %1, %0|%0, %1, %2}" + [(set_attr "mmx_isa" "native,x64_noavx,x64_avx") + (set_attr "type" "mmxmul,ssemul,ssemul") + (set_attr "mode" "DI,TI,TI")]) (define_expand "mmx_pmaddwd" [(set (match_operand:V2SI 0 "register_operand") -- 2.20.1