From patchwork Wed Nov 6 07:24:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Yukhin X-Patchwork-Id: 288745 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 336842C00AC for ; Wed, 6 Nov 2013 18:25:02 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=tb2jmXREzunsK+OyO C39YV+C3MvwdRcpPjf0ChH2CpET6uMdY27rjJxT2z9jZRLwb9WcYIrIU5BGv+qhc aeZwm7hcyhplxndvzhqjOr+3YVNcUNRWosvt4eUntxZPziQiFpj5qfnxaP4M+c78 MQEDb5QLMdwfS+iWhoJ7xaiJ4I= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=YuzyidAwYH7LH3itmbcr6L2 It4s=; b=fydYn9Lm4L2bMm9y1yItvOEXWTUuTQKdRlQXqnTD0beXRkb0MZXJdpJ Y2WWnmZvEspm467m46AiMu46+j6fpkoCzIm7oMwd4zV1NliL31BR2nEtR2JLmKvF S97HZcaCeauYoOTLkPRR3eRIKfXev2vhMlxiQgzK/HLOuuKy72pU= Received: (qmail 11880 invoked by alias); 6 Nov 2013 07:24:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 11868 invoked by uid 89); 6 Nov 2013 07:24:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RDNS_NONE, SPF_PASS, URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-pb0-f46.google.com Received: from Unknown (HELO mail-pb0-f46.google.com) (209.85.160.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 06 Nov 2013 07:24:51 +0000 Received: by mail-pb0-f46.google.com with SMTP id un15so3654909pbc.19 for ; Tue, 05 Nov 2013 23:24:43 -0800 (PST) X-Received: by 10.66.139.130 with SMTP id qy2mr2453749pab.73.1383722683621; Tue, 05 Nov 2013 23:24:43 -0800 (PST) Received: from msticlxl57.ims.intel.com (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by mx.google.com with ESMTPSA id pl1sm39268009pbb.20.2013.11.05.23.24.40 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 05 Nov 2013 23:24:42 -0800 (PST) Date: Wed, 6 Nov 2013 10:24:00 +0300 From: Kirill Yukhin To: Uros Bizjak , Richard Henderson , Jakub Jelinek Cc: GCC Patches Subject: Re: [PATCH i386 4/8] [AVX512] [7/8] Add substed patterns: `round for expand' subst. Message-ID: <20131106072400.GD23881@msticlxl57.ims.intel.com> References: <20130814074404.GE52726@msticlxl57.ims.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130814074404.GE52726@msticlxl57.ims.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Hello, This patch introduces dedicated subst to add rounding to structureless expands. Bootstrapped. Is it ok for trunk? --- Thanks, K --- gcc/config/i386/sse.md | 24 ++++++++++++------------ gcc/config/i386/subst.md | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 2325328..5aa1563 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -2752,17 +2752,17 @@ (match_operand:FMAMODE 3 "nonimmediate_operand")))] "") -(define_expand "avx512f_fmadd__maskz" +(define_expand "avx512f_fmadd__maskz" [(match_operand:VF_512 0 "register_operand") - (match_operand:VF_512 1 "nonimmediate_operand") - (match_operand:VF_512 2 "nonimmediate_operand") - (match_operand:VF_512 3 "nonimmediate_operand") + (match_operand:VF_512 1 "") + (match_operand:VF_512 2 "") + (match_operand:VF_512 3 "") (match_operand: 4 "register_operand")] "TARGET_AVX512F" { - emit_insn (gen_fma_fmadd__maskz_1 ( + emit_insn (gen_fma_fmadd__maskz_1 ( operands[0], operands[1], operands[2], operands[3], - CONST0_RTX (mode), operands[4])); + CONST0_RTX (mode), operands[4])); DONE; }) @@ -2994,17 +2994,17 @@ UNSPEC_FMADDSUB))] "TARGET_FMA || TARGET_FMA4 || TARGET_AVX512F") -(define_expand "avx512f_fmaddsub__maskz" +(define_expand "avx512f_fmaddsub__maskz" [(match_operand:VF_512 0 "register_operand") - (match_operand:VF_512 1 "nonimmediate_operand") - (match_operand:VF_512 2 "nonimmediate_operand") - (match_operand:VF_512 3 "nonimmediate_operand") + (match_operand:VF_512 1 "") + (match_operand:VF_512 2 "") + (match_operand:VF_512 3 "") (match_operand: 4 "register_operand")] "TARGET_AVX512F" { - emit_insn (gen_fma_fmaddsub__maskz_1 ( + emit_insn (gen_fma_fmaddsub__maskz_1 ( operands[0], operands[1], operands[2], operands[3], - CONST0_RTX (mode), operands[4])); + CONST0_RTX (mode), operands[4])); DONE; }) diff --git a/gcc/config/i386/subst.md b/gcc/config/i386/subst.md index 825c6d0..a3b2714 100644 --- a/gcc/config/i386/subst.md +++ b/gcc/config/i386/subst.md @@ -182,3 +182,21 @@ (set (match_dup 0) (match_dup 1)) (unspec [(match_operand:SI 2 "const_4_to_5_operand")] UNSPEC_EMBEDDED_ROUNDING)])]) + +(define_subst_attr "round_expand_name" "round_expand" "" "_round") +(define_subst_attr "round_expand_predicate" "round_expand" "nonimmediate_operand" "register_operand") +(define_subst_attr "round_expand_operand" "round_expand" "" ", operands[5]") + +(define_subst "round_expand" + [(match_operand:SUBST_V 0) + (match_operand:SUBST_V 1) + (match_operand:SUBST_V 2) + (match_operand:SUBST_V 3) + (match_operand:SUBST_S 4)] + "TARGET_AVX512F" + [(match_dup 0) + (match_dup 1) + (match_dup 2) + (match_dup 3) + (match_dup 4) + (unspec [(match_operand:SI 5 "const_0_to_4_operand")] UNSPEC_EMBEDDED_ROUNDING)])