From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37258 invoked by alias); 17 Feb 2019 17:09:00 -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 37249 invoked by uid 89); 17 Feb 2019 17:08:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-it1-f194.google.com Received: from mail-it1-f194.google.com (HELO mail-it1-f194.google.com) (209.85.166.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 17 Feb 2019 17:08:58 +0000 Received: by mail-it1-f194.google.com with SMTP id l15so22714954iti.4 for ; Sun, 17 Feb 2019 09:08:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=i0Y5MUXBnmLbhPQDzvWoy2c9wItoDc24wh8UN2SIMYQ=; b=hhnexy7JEmsPLfTH1MJIWl3QGXHx3xA988WCJsZ02dRgWWf5LlEe1MdyHD6E7Gfmuf YASD9OiSrr5CEMS7MAFUthAbMXrz8Sf98J+L2uNRtOGy7pdWcWgBv7wZt8RKEmz/hkPf A95TzgmFYKYxZM9oSfmf9L8b2O9aVasgfOHg3XzrfRtMOSbSCxZfUSCTSvxawgNNlBUu d+xB+ji04DBuQ29/YRWM18UnXC10sJalyZIHzw4JswIzZqa0vbZQS13gmlTRB9e2Y6NT IswgRnS77ekQpPcX3G7rM2mGRZRrs0L4hWANGRjsCM4EPHG77hbZX4pbulqql3w/a5mC QPMA== MIME-Version: 1.0 References: <20190216224032.4889-1-hjl.tools@gmail.com> <20190216224032.4889-39-hjl.tools@gmail.com> In-Reply-To: From: Uros Bizjak Date: Sun, 17 Feb 2019 17:09:00 -0000 Message-ID: Subject: Re: [PATCH 38/41] i386: Allow MMX vector expanders with TARGET_MMX_WITH_SSE To: "H.J. Lu" Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-02/txt/msg01405.txt.bz2 On Sun, Feb 17, 2019 at 6:03 PM H.J. Lu wrote: > > On Sun, Feb 17, 2019 at 8:24 AM Uros Bizjak wrote: > > > > On Sat, Feb 16, 2019 at 11:46 PM H.J. Lu wrote: > > > > > > PR target/89021 > > > * config/i386/i386.c (ix86_expand_vector_init_duplicate): Set > > > mmx_ok to true if TARGET_MMX_WITH_SSE is true. > > > (ix86_expand_vector_init_one_nonzero): Likewise. > > > (ix86_expand_vector_init_one_var): Likewise. > > > (ix86_expand_vector_init_general): Likewise. > > > (ix86_expand_vector_init): Likewise. > > > (ix86_expand_vector_set): Likewise. > > > (ix86_expand_vector_extract): Likewise. > > > > Please move this initialization to .md files. We don't support V2SF, so > > > > (define_expand "vec_setv2sf" > > [(match_operand:V2SF 0 "register_operand") > > (match_operand:SF 1 "register_operand") > > (match_operand 2 "const_int_operand")] > > "TARGET_MMX" > > { > > ix86_expand_vector_set (false, operands[0], operands[1], > > INTVAL (operands[2])); > > DONE; > > }) > > > > should remain false, while in: > > > > (define_expand "vec_setv2si" > > [(match_operand:V2SI 0 "register_operand") > > (match_operand:SI 1 "register_operand") > > (match_operand 2 "const_int_operand")] > > "TARGET_MMX" > > { > > ix86_expand_vector_set (false, operands[0], operands[1], > > INTVAL (operands[2])); > > DONE; > > }) > > > > we should use TARGET_MMX_WITH_SSE instead of false in the call to > > ix86_expand_vector_set. The same change for the other MMX modes: V4HI > > and V8QI. > > > > Same for other exported vector initializers: ix86_expand_vector_init > > and ix86_expand_vector_extract. We support V2SI, V4HI and V8QI, but > > not V2SF (non-MMX modes are agnostic to mmx_ok argument). > > > > There is limited support for V2SF with MMX. My goal is to emulate > all MMX features with SSE so that -msse2 -mno-mmx works for all > MMX codes which don't use MMX inline asm. Leaving out V2SF > emulation creates a hole in my implementation. Do you have testcases > to show issues with V2SF emulation? No, but V2SF should be avoided from emulation. Uros.