From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26934 invoked by alias); 20 Oct 2014 14:58:17 -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 26922 invoked by uid 89); 20 Oct 2014 14:58:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-la0-f52.google.com Received: from mail-la0-f52.google.com (HELO mail-la0-f52.google.com) (209.85.215.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 20 Oct 2014 14:58:15 +0000 Received: by mail-la0-f52.google.com with SMTP id hz20so4031504lab.25 for ; Mon, 20 Oct 2014 07:58:11 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.152.43.197 with SMTP id y5mr9862722lal.82.1413817091335; Mon, 20 Oct 2014 07:58:11 -0700 (PDT) Received: by 10.152.8.103 with HTTP; Mon, 20 Oct 2014 07:58:11 -0700 (PDT) In-Reply-To: <20141020134109.GO10376@tucnak.redhat.com> References: <20140925141206.GB27825@msticlxl57.ims.intel.com> <20141014071820.GA59591@msticlxl57.ims.intel.com> <20141020123610.GN10376@tucnak.redhat.com> <20141020133026.GA12661@msticlxl57.ims.intel.com> <20141020134109.GO10376@tucnak.redhat.com> Date: Mon, 20 Oct 2014 15:05:00 -0000 Message-ID: Subject: Re: [PATCH i386 AVX512] [56/n] Add plus/minus/abs/neg/andnot insn patterns. From: Uros Bizjak To: Jakub Jelinek Cc: Kirill Yukhin , Richard Henderson , GCC Patches Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-10/txt/msg01934.txt.bz2 On Mon, Oct 20, 2014 at 3:41 PM, Jakub Jelinek wrote: > On Mon, Oct 20, 2014 at 05:30:36PM +0400, Kirill Yukhin wrote: >> > Unfortunately this caused PR63600. The problem is that VI_AVX2 >> > mode iterator includes V2DI and for AVX2 also V4DI, but for pre-ssse3 >> > ix86_expand_sse2_abs doesn't handle V2DI (and can't easily, we don't have >> > PSRAQ instruction), for ssse3 there is no vpabsq instruction, and for >> > avx2 neither. >> > We can handle V2DI/V4DI only for TARGET_AVX512VL, and V8DI for >> > TARGET_AVX512F. >> > Thus, IMHO the mode iterator on at least >> > (define_insn "*abs2" >> > and on >> > (define_expand "abs2" >> > is wrong, should not include V2DI/V4DI unless TARGET_AVX512VL >> > (so new (or ressurrected, was that VI124_AVX2_48_AVX512F?) >> > specialized mode iterator?). >> >> >> This patch removes absq insn patterns for non-AVX-512 targets. >> >> >> gcc/ >> * config/i386/sse.md (define_mode_iterator VI_AVX2): Restore to 128-, >> 256- bit integer modes only. >> (define_mode_iterator VI_AVX2_AVX512): New. >> (define_expand "neg2"): Use VI_AVX2_AVX512 mode iterator. >> (define_expand "3"): Ditto. >> (define_insn "*3"): Ditto. >> (define_expand "_andnot3"): Ditto. >> (define_mode_iterator VI1248_AVX512VL_AVX512BW): New. >> (define_insn "abs2"): Ditto. >> >> Bootstrap in progress. AVX-512 tests pass. >> >> Is it ok for trunk? > > I'll certainly leave the review to Uros, whatever he prefers. > That said, I was expecting you'd keep VI_AVX2 as is (because from the patch > clearly that is what is used most commonly, the V?DI modes are for most > insns normal integral vector modes, VI* uses the same modes and VI_AVX2 > used to be just like VI, just with TARGET_AVX conditions replaced with > TARGET_AVX2), and just add a new mode iterator for the two abs patterns > (*abs2 and abs2), it can be specialized mode iterator just > for the abs with ABS in names or something. Yes, I like this idea, too. Just add IV1248_AVX512VL_AVX512BW and use it in abs patterns. The changed patch is pre-approved, but please still make full bootstrap and regtest cycle. Thanks, Uros.