From patchwork Tue May 26 17:19:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 1298257 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=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=RTEqqzRd; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49WghC2jB2z9sPF for ; Wed, 27 May 2020 03:20:09 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B568C3896140; Tue, 26 May 2020 17:20:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B568C3896140 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1590513607; bh=45PZN7E0nLA2lS/akUxX+AUdRQkET7ytEkiCXePx/eM=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=RTEqqzRd8Mno/dzZdoC4XzWIyoN34jBDh+Msg+t+1uwK5HSQw+QRRqyW6jcW43bLC KoLP+7ukDDGHRDqHQQeD0I2iBsLauv620fdQ1gBOV2wT4309K2/togeZCrBLyQI5zL T4F2JeJA5+9PltH+tGi3N2DXzur9BKe8e8Ellht4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by sourceware.org (Postfix) with ESMTPS id 0B5C33895460 for ; Tue, 26 May 2020 17:20:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0B5C33895460 Received: by mail-qv1-xf29.google.com with SMTP id x13so9809309qvr.2 for ; Tue, 26 May 2020 10:20:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=45PZN7E0nLA2lS/akUxX+AUdRQkET7ytEkiCXePx/eM=; b=bA+54ieYY32FzAwtUGEkuEjNELzLn3N0IuRfe/ZJcGoobdC5vNIMpeuFBQndhSEFGn Ju2zwFNnK72qW9+pRuHOFXw/hgwgUqFIFjHzwCOEm6qaVrFlkQBrdi09OzhOzegOb7gk 3SKX+6HqscGReZDn7LNrW+Wg4xyxdT89qawDImcslgevKYdfd8TLhLk6fbDRp6ACVZdz rlDq4fvppwVeXRkvDonCbhZ2Z7pwUgFIhimRReU1QdswuS9b+xjCDx8jjvWQ22Ip05sZ K/It8O47rjblco7Y+J6lN1HfrgJ6+pttNgVOx9GqkTxCoDQVkpDoHqG6MiJhyl3FvELv 3vyA== X-Gm-Message-State: AOAM530UTcsCvFPQo7/H6hO9cSYQd7P9daeZTeDoCFx73ZXIo21rm7l4 zoOHbulHzgetElhSQ72q72TOgOLOYtItXJqxJm8OywRjzsI= X-Google-Smtp-Source: ABdhPJxsYmKo9pFB9+g8maKlJHpwKYxnObTBUzKvjtuQFkAvh6fZ7FMUeM3G/orUPhR+qW6saUuoAmnVRhJvOG0439M= X-Received: by 2002:a05:6214:7eb:: with SMTP id bp11mr21771440qvb.8.1590513604304; Tue, 26 May 2020 10:20:04 -0700 (PDT) MIME-Version: 1.0 Date: Tue, 26 May 2020 19:19:53 +0200 Message-ID: Subject: [committed] i386: Add SSE2 alternative to mmx_pswapd2vsi2 To: "gcc-patches@gcc.gnu.org" X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Uros Bizjak via Gcc-patches From: Uros Bizjak Reply-To: Uros Bizjak Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" 2020-05-26 Uroš Bizjak gcc/ChangeLog: * config/i386/mmx.md (mmx_pswapdv2si2): Add SSE2 alternative. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Uros. diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index c31b4f81079..215162dedb5 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -2011,15 +2011,21 @@ (set_attr "mode" "TI")]) (define_insn "mmx_pswapdv2si2" - [(set (match_operand:V2SI 0 "register_operand" "=y") + [(set (match_operand:V2SI 0 "register_operand" "=y,Yv") (vec_select:V2SI - (match_operand:V2SI 1 "nonimmediate_operand" "ym") + (match_operand:V2SI 1 "register_mmxmem_operand" "ym,Yv") (parallel [(const_int 1) (const_int 0)])))] - "TARGET_3DNOW_A" - "pswapd\t{%1, %0|%0, %1}" - [(set_attr "type" "mmxcvt") - (set_attr "prefix_extra" "1") - (set_attr "mode" "DI")]) + "TARGET_3DNOW_A || TARGET_MMX_WITH_SSE" + "@ + pswapd\t{%1, %0|%0, %1} + %vpshufd\t{$0xe1, %1, %0|%0, %1, 0xe1}"; + [(set_attr "isa" "*,sse2") + (set_attr "mmx_isa" "native,*") + (set_attr "type" "mmxcvt,sselog1") + (set_attr "prefix_extra" "1,*") + (set_attr "prefix_data16" "*,1") + (set_attr "length_immediate" "*,1") + (set_attr "mode" "DI,TI")]) (define_insn "*vec_dupv4hi" [(set (match_operand:V4HI 0 "register_operand" "=y,xYw")