From patchwork Thu Aug 14 11:42:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Yukhin X-Patchwork-Id: 379906 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 524AF140088 for ; Thu, 14 Aug 2014 21:42:31 +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=L+hz8UzhrfpQGxVpTUmFqiMRh176W7bTV2xpZsS6W5V59BCsXs 0otxZDFiGxV3BtOe+9lWyBXJeJrJ4IQvx6NntSOYA4b8lJvDAzhBGKTq9xcsNKb/ TnwFjx+ZXz/uPjqF6txPV51tfd4H1LsYH/a8NE7Mb46rutx/H6JspFDJc= 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=X/9cpwtvEHjp3wMvo6O8c7JnKqw=; b=by9IVJkZ0GZDiGKi1iKr oqF1fDnUhRmpFYwAERTClF8nja32XSTeK48WEQbHZ1ubiNtaQin+PKQ1SKsdXokQ 20SX496zwVfLDUfvAweKjzJUoIEP0TNDJ7LIw80pkvJGkTMKtVbV8I6i23zaK35a VHtv4R6Insfqe1G1Ut4jZfw= Received: (qmail 21408 invoked by alias); 14 Aug 2014 11:42:24 -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 21397 invoked by uid 89); 14 Aug 2014 11:42:24 -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-yh0-f49.google.com Received: from mail-yh0-f49.google.com (HELO mail-yh0-f49.google.com) (209.85.213.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 14 Aug 2014 11:42:22 +0000 Received: by mail-yh0-f49.google.com with SMTP id b6so883114yha.22 for ; Thu, 14 Aug 2014 04:42:20 -0700 (PDT) X-Received: by 10.236.209.97 with SMTP id r61mr16178993yho.3.1408016540857; Thu, 14 Aug 2014 04:42:20 -0700 (PDT) Received: from msticlxl57.ims.intel.com (fmdmzpr01-ext.fm.intel.com. [192.55.54.36]) by mx.google.com with ESMTPSA id y65sm10057543yhl.26.2014.08.14.04.42.17 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Aug 2014 04:42:20 -0700 (PDT) Date: Thu, 14 Aug 2014 15:42:12 +0400 From: Kirill Yukhin To: Uros Bizjak Cc: Jakub Jelinek , Richard Henderson , GCC Patches , kirill.yukhin@gmail.com Subject: [PATCH i386 AVX512] [12/n] Extend OI/TImode moves. Message-ID: <20140814114211.GF49937@msticlxl57.ims.intel.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Hello, This patch extends moves to OI/TI mode. Bootstrapped. New tests on top of patch-set all pass under simulator. Is it ok for trunk? gcc/ * config/i386/i386.md (define_insn "*movoi_internal_avx"): Add EVEX version. (define_insn "*movti_internal"): Ditto. --- Thanks, K diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 3a797c8..39fb2307 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -1920,8 +1920,8 @@ (set_attr "mode" "XI")]) (define_insn "*movoi_internal_avx" - [(set (match_operand:OI 0 "nonimmediate_operand" "=x,x ,m") - (match_operand:OI 1 "vector_move_operand" "C ,xm,x"))] + [(set (match_operand:OI 0 "nonimmediate_operand" "=v,v ,m") + (match_operand:OI 1 "vector_move_operand" "C ,vm,v"))] "TARGET_AVX && !(MEM_P (operands[0]) && MEM_P (operands[1]))" { switch (get_attr_type (insn)) @@ -1935,6 +1935,8 @@ { if (get_attr_mode (insn) == MODE_V8SF) return "vmovups\t{%1, %0|%0, %1}"; + else if (get_attr_mode (insn) == MODE_XI) + return "vmovdqu32\t{%1, %0|%0, %1}"; else return "vmovdqu\t{%1, %0|%0, %1}"; } @@ -1942,6 +1944,8 @@ { if (get_attr_mode (insn) == MODE_V8SF) return "vmovaps\t{%1, %0|%0, %1}"; + else if (get_attr_mode (insn) == MODE_XI) + return "vmovdqa32\t{%1, %0|%0, %1}"; else return "vmovdqa\t{%1, %0|%0, %1}"; } @@ -1953,7 +1957,10 @@ [(set_attr "type" "sselog1,ssemov,ssemov") (set_attr "prefix" "vex") (set (attr "mode") - (cond [(match_test "TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL") + (cond [(ior (match_operand 0 "ext_sse_reg_operand") + (match_operand 1 "ext_sse_reg_operand")) + (const_string "XI") + (match_test "TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL") (const_string "V8SF") (and (eq_attr "alternative" "2") (match_test "TARGET_SSE_TYPELESS_STORES")) @@ -1962,8 +1969,8 @@ (const_string "OI")))]) (define_insn "*movti_internal" - [(set (match_operand:TI 0 "nonimmediate_operand" "=!r ,o ,x,x ,m") - (match_operand:TI 1 "general_operand" "riFo,re,C,xm,x"))] + [(set (match_operand:TI 0 "nonimmediate_operand" "=!r ,o ,v,v ,m") + (match_operand:TI 1 "general_operand" "riFo,re,C,vm,v"))] "(TARGET_64BIT || TARGET_SSE) && !(MEM_P (operands[0]) && MEM_P (operands[1]))" { @@ -1983,6 +1990,8 @@ { if (get_attr_mode (insn) == MODE_V4SF) return "%vmovups\t{%1, %0|%0, %1}"; + else if (get_attr_mode (insn) == MODE_XI) + return "vmovdqu32\t{%1, %0|%0, %1}"; else return "%vmovdqu\t{%1, %0|%0, %1}"; } @@ -1990,6 +1999,8 @@ { if (get_attr_mode (insn) == MODE_V4SF) return "%vmovaps\t{%1, %0|%0, %1}"; + else if (get_attr_mode (insn) == MODE_XI) + return "vmovdqa32\t{%1, %0|%0, %1}"; else return "%vmovdqa\t{%1, %0|%0, %1}"; } @@ -2005,7 +2016,10 @@ (const_string "maybe_vex") (const_string "orig"))) (set (attr "mode") - (cond [(eq_attr "alternative" "0,1") + (cond [(ior (match_operand 0 "ext_sse_reg_operand") + (match_operand 1 "ext_sse_reg_operand")) + (const_string "XI") + (eq_attr "alternative" "0,1") (const_string "DI") (ior (not (match_test "TARGET_SSE2")) (match_test "TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL"))