From patchwork Mon Apr 25 21:59:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 614718 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 3qv0WR5WBwz9t3n for ; Tue, 26 Apr 2016 07:59:46 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=DKotKy3u; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=V2AEpNYR1rpBoqnvqYrbpbpJcR75dNxpVVAbdj8EXw7afG L2vg8nMHDH+S14nIO+GUM4XLQIkqYI25NWP9RB1cMbitq1zUXM/CY6QW5MLtBDKA K16SHguU2NkCLHs5sFk1ndb4yz8nHVAIeOYIy2nAxyQmx7IAYuNkT7H/QEWhQ= 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 :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=fNCCu//IheSoD7PTBsFmX4xm22s=; b=DKotKy3uZTX24YJGG9VK 6itDqkGJr7VYztTipimOqQlqQ8bUJ7wnsShGhiOkfsK36BNBgY22yskIybwAw5EA npPs9i5EDKSbQGI3/05/vQ9BG0SYBrFaIHax+ULWcXgOqgH9QaopgjIxG+43JfW/ +yrKjMI2I2+7FfiTC2j9XTc= Received: (qmail 95818 invoked by alias); 25 Apr 2016 21:59:37 -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 95735 invoked by uid 89); 25 Apr 2016 21:59:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 spammy=ubizjak@gmail.com, ubizjakgmailcom, 8727, 872, 7 X-HELO: mail-vk0-f47.google.com Received: from mail-vk0-f47.google.com (HELO mail-vk0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 25 Apr 2016 21:59:26 +0000 Received: by mail-vk0-f47.google.com with SMTP id n67so7966687vkf.3 for ; Mon, 25 Apr 2016 14:59:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=VILKKrw7uHFFFuu+0cvRCOzF7Es7eJ/GdIBG3enw3cY=; b=LwCf/2FpjevAlsmfHZ3rWpSqsI5vI3pzRCF5dQvK7iPSC+IEZs5cFXbo8q5hWFcwu+ iEORGkMNEYcnK5BvraG6Ct8P5woOaDGqECKWYyKQ1wvSA0BiZb/dtx+v00VtqRmIb4SV 7nGWCfDtUor3oJljLBnx3NXraNGu618GoDc3aUy1ivf/HxYce0DDnhnJ5srrwCqS2C7C G0h4DaWejbaFXGPdmr5opIiDSb/NqZxCzxpAyM+IGKIgOjya3EYGTFXPc0MlBatx2oNJ 8seSPsGyq69X3esvfwZ8w74AHathUz768D/MTaNefrTbs348IwIY27PwmYscJrmbQAVh wxwQ== X-Gm-Message-State: AOPr4FVkInukmtyIFK/CFqpG5A1Essu6li5+nJ9OTFNFkKKmZJ9mITsQdmDH6NZhUDu0ecF80kRZ/CEP8/6SpA== MIME-Version: 1.0 X-Received: by 10.31.13.206 with SMTP id 197mr567762vkn.128.1461621564207; Mon, 25 Apr 2016 14:59:24 -0700 (PDT) Received: by 10.103.76.220 with HTTP; Mon, 25 Apr 2016 14:59:24 -0700 (PDT) Date: Mon, 25 Apr 2016 23:59:24 +0200 Message-ID: Subject: [PATCH, i386]: Small improvements to move patterns From: Uros Bizjak To: "gcc-patches@gcc.gnu.org" No functional changes. 2016-04-25 Uros Bizjak * config/i386/i386.md (*movxi_internal_avx512f): Use insn type attribute instead of which_alternative. * config/i386/sse.md (*mov_internal): Ditto. Use EXT_REX_SSE_REG_P where appropriate. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Committed to mainline. Uros. Index: i386.md =================================================================== --- i386.md (revision 235416) +++ i386.md (working copy) @@ -1975,17 +1975,18 @@ && (register_operand (operands[0], XImode) || register_operand (operands[1], XImode))" { - switch (which_alternative) + switch (get_attr_type (insn)) { - case 0: + case TYPE_SSELOG1: return standard_sse_constant_opcode (insn, operands[1]); - case 1: - case 2: + + case TYPE_SSEMOV: if (misaligned_operand (operands[0], XImode) || misaligned_operand (operands[1], XImode)) return "vmovdqu32\t{%1, %0|%0, %1}"; else return "vmovdqa32\t{%1, %0|%0, %1}"; + default: gcc_unreachable (); } Index: sse.md =================================================================== --- sse.md (revision 235416) +++ sse.md (working copy) @@ -839,19 +839,18 @@ && (register_operand (operands[0], mode) || register_operand (operands[1], mode))" { - int mode = get_attr_mode (insn); - switch (which_alternative) + switch (get_attr_type (insn)) { - case 0: + case TYPE_SSELOG1: return standard_sse_constant_opcode (insn, operands[1]); - case 1: - case 2: + + case TYPE_SSEMOV: /* There is no evex-encoded vmov* for sizes smaller than 64-bytes in avx512f, so we need to use workarounds, to access sse registers 16-31, which are evex-only. In avx512vl we don't need workarounds. */ if (TARGET_AVX512F && < 64 && !TARGET_AVX512VL - && ((REG_P (operands[0]) && EXT_REX_SSE_REGNO_P (REGNO (operands[0]))) - || (REG_P (operands[1]) && EXT_REX_SSE_REGNO_P (REGNO (operands[1]))))) + && (EXT_REX_SSE_REG_P (operands[0]) + || EXT_REX_SSE_REG_P (operands[1]))) { if (memory_operand (operands[0], mode)) { @@ -873,7 +872,7 @@ } else /* Reg -> reg move is always aligned. Just use wider move. */ - switch (mode) + switch (get_attr_mode (insn)) { case MODE_V8SF: case MODE_V4SF: @@ -888,7 +887,8 @@ gcc_unreachable (); } } - switch (mode) + + switch (get_attr_mode (insn)) { case MODE_V16SF: case MODE_V8SF: @@ -931,6 +931,7 @@ default: gcc_unreachable (); } + default: gcc_unreachable (); }