From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9567 invoked by alias); 29 Nov 2017 08:35:42 -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 9552 invoked by uid 89); 29 Nov 2017 08:35:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Received:Wed, Hx-languages-length:2730 X-HELO: mail-it0-f67.google.com Received: from mail-it0-f67.google.com (HELO mail-it0-f67.google.com) (209.85.214.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Nov 2017 08:35:39 +0000 Received: by mail-it0-f67.google.com with SMTP id p139so3114479itb.1 for ; Wed, 29 Nov 2017 00:35:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NYcqm2eJTvyf/z9kh89MtwYa4ofn4qX9TM2BfYrqNJo=; b=Iy6BDcH7SC3KDUadeatxIQqEJGraOshW5DfqrIhya/RnM613cAYb6u8Z4cOvE0EtBR nB9MzCCsZdrSCJ9cIqRJ7LQJoUSLwb1hbUAFPbApFc41MAno35Hp1uCBOt+nAFEYmGWs txZmwXeCw4ECl0xSeYitaxFBRvONeYpqvbAlxoWNuMM6gIo0+eMtNIxgt4KITnan/xiV RpYByVVOBwI5vCt5NIWKs+E9VYomAZr6P6q/sRiYQtc91kseIcjxjTk2XCq3yoXfDLW6 dPBFTKbBSBiOl3LVgwKWsa9pRf/Yrs8nCT66ciTrbAkRfsEyivJPbPVExu1JS95kQyva HRGA== X-Gm-Message-State: AJaThX4+TgrI+O+D4hKwI3c9BOJLZBxQC/PU/Yz3M/+jnYYnt7iQtiLX R6ow/z5ztbXpCkAmtQli/qHZreL3HacydYmJa74= X-Google-Smtp-Source: AGs4zMYcP/7a0UuR8z/2t3+DYcuvQ5Wo8tM26gQWOhR1JXMRBUj1fPl15/S2AocC/qJgpo6vPp9IBzmGFSLeAQKVd7M= X-Received: by 10.36.246.8 with SMTP id u8mr6148664ith.2.1511944537612; Wed, 29 Nov 2017 00:35:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.43.85 with HTTP; Wed, 29 Nov 2017 00:35:36 -0800 (PST) In-Reply-To: <20171129082442.GW2353@tucnak> References: <20171129082442.GW2353@tucnak> From: Uros Bizjak Date: Wed, 29 Nov 2017 09:36:00 -0000 Message-ID: Subject: Re: [PATCH] Fix vec_concatv2di pattern for SSE4 (PR target/80819) To: Jakub Jelinek Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-11/txt/msg02477.txt.bz2 On Wed, Nov 29, 2017 at 9:24 AM, Jakub Jelinek wrote: > Hi! > > Before r218303 we had just (=x,0,rm) alternative for SSE4 (no AVX), > that change turned it into (=Yr,0,*rm) and (=*x,0,rm) alternatives, > so that we avoid too many prefixes if possible. > The latter alternative is fine, we want the *, because that is the point, > Yr class is the subset of x registers that don't need the REX prefix. > The * in the first alternative makes no sense, with it IRA is effectively > forced to allocate the second vec_concat pseudo into NO_REGS - memory, > and while postreload can fix it up afterwards, we end up with dead stores > that nothing ever removes afterwards. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for > trunk? > > 2017-11-29 Jakub Jelinek > > PR target/80819 > * config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm) > alternative. > > * gcc.target/i386/pr80819-1.c: New test. > * gcc.target/i386/pr80819-2.c: New test. OK. Thanks, Uros. > --- gcc/config/i386/sse.md.jj 2017-11-24 08:58:05.000000000 +0100 > +++ gcc/config/i386/sse.md 2017-11-28 18:04:20.739396199 +0100 > @@ -13915,7 +13915,7 @@ (define_insn "vec_concatv2di" > (match_operand:DI 1 "nonimmediate_operand" > " 0, 0,x ,Yv,r ,vm,?!*Yn,0,Yv,0,0,v") > (match_operand:DI 2 "vector_move_operand" > - "*rm,rm,rm,rm,C ,C ,C ,x,Yv,x,m,m")))] > + " rm,rm,rm,rm,C ,C ,C ,x,Yv,x,m,m")))] > "TARGET_SSE" > "@ > pinsrq\t{$1, %2, %0|%0, %2, 1} > --- gcc/testsuite/gcc.target/i386/pr80819-1.c.jj 2017-11-28 18:11:09.452482042 +0100 > +++ gcc/testsuite/gcc.target/i386/pr80819-1.c 2017-11-28 18:09:57.000000000 +0100 > @@ -0,0 +1,13 @@ > +/* PR target/80819 */ > +/* { dg-do compile { target { ! ia32 } } } */ > +/* { dg-options "-O2 -msse4 -mno-avx -mtune=haswell -masm=att" } */ > + > +typedef unsigned long long V __attribute__((vector_size (16))); > + > +V > +foo (unsigned long long x, unsigned long long y) > +{ > + return (V) { x, y }; > +} > + > +/* { dg-final { scan-assembler-not "movq\[ \t]*%rsi, \[-0-9]*\\(" } } */ > --- gcc/testsuite/gcc.target/i386/pr80819-2.c.jj 2017-11-28 18:11:15.942404034 +0100 > +++ gcc/testsuite/gcc.target/i386/pr80819-2.c 2017-11-28 18:11:21.915332239 +0100 > @@ -0,0 +1,13 @@ > +/* PR target/80819 */ > +/* { dg-do compile { target { ! ia32 } } } */ > +/* { dg-options "-O2 -msse4 -mno-avx -mtune=generic -masm=att" } */ > + > +typedef unsigned long long V __attribute__((vector_size (16))); > + > +V > +foo (unsigned long long x, unsigned long long y) > +{ > + return (V) { x, y }; > +} > + > +/* { dg-final { scan-assembler-not "movq\[ \t]*%rsi, \[-0-9]*\\(" } } */ > > Jakub