From patchwork Tue Sep 23 11:32:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Yukhin X-Patchwork-Id: 392429 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A9F31140081 for ; Tue, 23 Sep 2014 21:32:48 +1000 (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:mime-version:content-type; q=dns; s=default; b=U9qjBJwBLC9iLDntFgbVefJev50Z0SPmIp895ceVhdloXC+o6l eSi4SanX2izk9nMROarQH9AwINFQVKyPvCn59G0JG7g3yYcnTPNJ8rVurBommH83 AyhUV0dFhP0mHh6jp/OfYj6IsIo88KZvCJoBzKM5zWtsvt/F4Q6olaeko= 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:mime-version:content-type; s= default; bh=XIzYpUjNyZuVeBMVuxlskH0lIo4=; b=kKr2GtIwF7EKskF8Aj+Q rc791sKfaroj9aPKJy2zzmQMOkbj91BdBj84SJttE7c0yd8P1ngS0RDT3pai11zp PSMltn4+k7jEdQUdd5AI5Zl2uWwwJnEML/yGyLTkL1MWvwXEtM+tMV5vgBDnYQSE aIm+8ow+oM1/dghD1O08w/E= Received: (qmail 7431 invoked by alias); 23 Sep 2014 11:32:42 -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 7420 invoked by uid 89); 23 Sep 2014 11:32:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f50.google.com Received: from mail-wg0-f50.google.com (HELO mail-wg0-f50.google.com) (74.125.82.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 23 Sep 2014 11:32:40 +0000 Received: by mail-wg0-f50.google.com with SMTP id l18so3340079wgh.33 for ; Tue, 23 Sep 2014 04:32:37 -0700 (PDT) X-Received: by 10.180.101.40 with SMTP id fd8mr2580485wib.63.1411471957457; Tue, 23 Sep 2014 04:32:37 -0700 (PDT) Received: from msticlxl57.ims.intel.com (fmdmzpr02-ext.fm.intel.com. [192.55.55.37]) by mx.google.com with ESMTPSA id cf3sm15590221wjc.17.2014.09.23.04.32.34 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Sep 2014 04:32:36 -0700 (PDT) Date: Tue, 23 Sep 2014 15:32:27 +0400 From: Kirill Yukhin To: Uros Bizjak Cc: Jakub Jelinek , Richard Henderson , GCC Patches , kirill.yukhin@gmail.com Subject: [PATCH i386 AVX512] [50/n] Add cvtps2 insn patterns. Message-ID: <20140923113226.GE41516@msticlxl57.ims.intel.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Hello, Patch in the bottom extends truncation insn patterns. Bootstrapped. AVX-512* tests on top of patch-set all pass under simulator. Is it ok for trunk? gcc/ * config/i386/sse.md (define_insn "_fix_notrunc"): Add masking. (define_insn "fix_truncv8sfv8si2"): Ditto. (define_insn "fix_truncv4sfv4si2"): Ditto. --- Thanks, K diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 133ba1e..f76cdfb 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -3937,13 +3937,13 @@ (define_mode_attr sf2simodelower [(V16SI "v16sf") (V8SI "v8sf") (V4SI "v4sf")]) -(define_insn "_fix_notrunc" +(define_insn "_fix_notrunc" [(set (match_operand:VI4_AVX 0 "register_operand" "=v") (unspec:VI4_AVX [(match_operand: 1 "nonimmediate_operand" "vm")] UNSPEC_FIX_NOTRUNC))] - "TARGET_SSE2" - "%vcvtps2dq\t{%1, %0|%0, %1}" + "TARGET_SSE2 && " + "%vcvtps2dq\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") (set (attr "prefix_data16") (if_then_else @@ -4031,20 +4031,20 @@ (set_attr "prefix" "evex") (set_attr "mode" "XI")]) -(define_insn "fix_truncv8sfv8si2" - [(set (match_operand:V8SI 0 "register_operand" "=x") - (fix:V8SI (match_operand:V8SF 1 "nonimmediate_operand" "xm")))] - "TARGET_AVX" - "vcvttps2dq\t{%1, %0|%0, %1}" +(define_insn "fix_truncv8sfv8si2" + [(set (match_operand:V8SI 0 "register_operand" "=v") + (fix:V8SI (match_operand:V8SF 1 "nonimmediate_operand" "vm")))] + "TARGET_AVX && " + "vcvttps2dq\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") - (set_attr "prefix" "vex") + (set_attr "prefix" "") (set_attr "mode" "OI")]) -(define_insn "fix_truncv4sfv4si2" - [(set (match_operand:V4SI 0 "register_operand" "=x") - (fix:V4SI (match_operand:V4SF 1 "nonimmediate_operand" "xm")))] - "TARGET_SSE2" - "%vcvttps2dq\t{%1, %0|%0, %1}" +(define_insn "fix_truncv4sfv4si2" + [(set (match_operand:V4SI 0 "register_operand" "=v") + (fix:V4SI (match_operand:V4SF 1 "nonimmediate_operand" "vm")))] + "TARGET_SSE2 && " + "%vcvttps2dq\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") (set (attr "prefix_rep") (if_then_else @@ -4057,7 +4057,7 @@ (const_string "*") (const_string "0"))) (set_attr "prefix_data16" "0") - (set_attr "prefix" "maybe_vex") + (set_attr "prefix" "") (set_attr "mode" "TI")]) (define_expand "fixuns_trunc2"