From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130081 invoked by alias); 4 Aug 2015 12:06:18 -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 130070 invoked by uid 89); 4 Aug 2015 12:06:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f43.google.com Received: from mail-oi0-f43.google.com (HELO mail-oi0-f43.google.com) (209.85.218.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 04 Aug 2015 12:06:17 +0000 Received: by oio137 with SMTP id 137so86592oio.0 for ; Tue, 04 Aug 2015 05:06:15 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.197.2 with SMTP id v2mr2680075oif.80.1438689975000; Tue, 04 Aug 2015 05:06:15 -0700 (PDT) Received: by 10.60.58.41 with HTTP; Tue, 4 Aug 2015 05:06:14 -0700 (PDT) In-Reply-To: <20150804115838.GB32256@msticlxl57.ims.intel.com> References: <20150804115838.GB32256@msticlxl57.ims.intel.com> Date: Tue, 04 Aug 2015 12:06:00 -0000 Message-ID: Subject: Re: [PATCH, i386] Merge SSE and AVX ptest patterns. From: Uros Bizjak To: Kirill Yukhin Cc: GCC Patches Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-08/txt/msg00171.txt.bz2 On Tue, Aug 4, 2015 at 1:58 PM, Kirill Yukhin wrote: > Hello, > I've merged ptest insn patterns from AVX and SSE. > I've also extended mode iterator to allow any 128/256 bit mode > for the insn as it register-wide, which may help implementing > https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02788.html > > > Bootstrapped and regtested. > > If no objections, I'll commit it into main trunk tomorrow morning (Moscow time). > > gcc/ > * config/i386/i386.c (bdesc_args): Rename CODE_FOR_sse4_1_ptest into > CODE_FOR_sse4_1_ptestv2di and CODE_FOR_avx_vtestps256 into > CODE_FOR_avx_ptestv4di. > * config/i386/sse.md (define_mode_iterator V_AVX): New. > (define_mode_attr sse4_1): Extend to other 128/256-bit modes. > (define_insn "avx_ptest256"): Merge this ... > (define_insn "sse4_1_ptest"): And this ... > (define_insn "_ptest"): Into this. Use V_AVX iterator. > > + (set (attr "btver2_decode") > + (if_then_else > + (and (eq_attr "alternative" "2") > + (match_test "mode==OImode")) > + (const_string "vector") > + (const_string "*"))) "vector" does not depend on alternative, but only on mode. So the and above should be removed. Uros.