From patchwork Thu Jan 11 13:08:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 124199 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp656275qgn; Thu, 11 Jan 2018 05:09:06 -0800 (PST) X-Google-Smtp-Source: ACJfBos1RaDxP5gQg+eOLzKZh+dxO73E7hTSC4eye+H52LBs8KV1fPCDnnCgqO8Jmv5nJnyBUGF3 X-Received: by 10.84.131.33 with SMTP id 30mr23122295pld.264.1515676145963; Thu, 11 Jan 2018 05:09:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515676145; cv=none; d=google.com; s=arc-20160816; b=siAyGEUpHtHEn859Gql5rn/G6KSzvw5EM5UPEctz0uR35F3Z/rcYSwObtMQCsGwkOu 7+MyEuW5oqNo/tdhq8F+EAmOixHRxcQysKDSnuQ6CY2Gy1YirSonja9IeJHe3D/gOIHk kUVujAWie4Z7BLw2kxaCP9gepAMNnt0fB0Aj025W9m8BMR1JD24ZTNPp43C1F3s+9G5A /H/MDlnn8peYilJ0rpr639xfULTFKViFwwgVDtr225NNB3Z0kHyXhendBfTTG1KCOUHU NgW+DOIkr5mk8z1ADP9IKKZWwDoUqUgUggg7rFCoPvcs8RKY08QlIlhgOUgYtzIEiC4Y dB/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:date:subject:mail-followup-to:to :from:delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=XAsdwp/LuMy6CHxAwMQqF7NY8+58qpCnfc347dvH0IU=; b=ins0FoEwsBlw5wwp/bJnTR119VLv2WANFcp0jxAa9lghI2CGNNQzSoEmwLbCUMxOaB sY4JWDLmoVKixHIe7sd0mNAVSDs6g0vKFnjfomTLD/klFP7AqE/u3pfZMxNpHmKdJM5h nJHw0M1uWslSQJB7uOaX7zu4iykV2Kg7qiJoUbyXoUjdEwxrhtAhBYhRyMMGLmqUK8xT cFIC7kDvnAyUC/aWCIXjSwwc02xKnY/RpE2JEp0M/c/zQCfR3NZAoGal04ZDM2NSavHG 902Bz+FB49VIcK9haxGV2UE/1S+8UM9nPBeWJ14DQ/kxD7mUVOpBGAWGzcGsbKaeMgaj +RVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=gWPznuZG; spf=pass (google.com: domain of gcc-patches-return-470830-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-470830-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id f184si1956622pgc.696.2018.01.11.05.09.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2018 05:09:05 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-470830-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=gWPznuZG; spf=pass (google.com: domain of gcc-patches-return-470830-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-470830-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=MlY+/B8JStvc3d8Aa7v4CQwpYxR7bgUkhrLYuce4kYM5+plCKVQ/Z 5lMDXPqoLPlNhnNubFmUsnpuz0sKBS3siiWOk1mZkETnjURG60eDUxNkB8ieoP7Y T46NxGkz9+4d4O29x0oRq8pUkSk2dt5OU9ZrU5WA1bEcvSU2+N9oME= 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:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=bpWJTuKPEbErlDRrPQ85JGWE+WI=; b=gWPznuZGAF714OTJ9Y6y iOUjJdHzolfck1+/aKkMslNk/iksdYDNqpCBPqJJ7UhxIuFYlaleLDI29tcTc5+E YpR6xiw1f13Tyhs/+2DMu1gTiOwjEn7gRSZoxmfuqNtI85ruljKZR3du8MNEAqw0 uEPgFRJJyoHMJNiLaQar44Q= Received: (qmail 72153 invoked by alias); 11 Jan 2018 13:08:54 -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 72112 invoked by uid 89); 11 Jan 2018 13:08:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f49.google.com Received: from mail-wm0-f49.google.com (HELO mail-wm0-f49.google.com) (74.125.82.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Jan 2018 13:08:51 +0000 Received: by mail-wm0-f49.google.com with SMTP id f140so5314380wmd.2 for ; Thu, 11 Jan 2018 05:08:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:subject:date:message-id :user-agent:mime-version; bh=XAsdwp/LuMy6CHxAwMQqF7NY8+58qpCnfc347dvH0IU=; b=M8insbODH2yHP8N3ST62fDdGgd+hfq0luRfODOGLUkTIHuoYy2Y9lU63824VEUSjqs 5h7Dc71SMmBYJUvRBnJvicg9zvSsAXw6LIEv3h1SLzIo8eFEA687Yntjv86+lrfAAWbM DPL7an+3QyCFgNb/cBhoGNFWXGAJHSILR5kppIA8oySKjGEiqDJvs5wcat2PUC6QtJKL VuTuWMpakPPABTqVNmmeCSGGkaPq41MotTmOWfL7d8vZ2AtCV6HC5NPnG6oQUFVyHET1 eP+o9mJU1lLQXKFjvxAYtnx7ampyrlAQ6Eq+MPdRqJvlsNpfbklgVaNqfiyWb/rjzFT+ 8Zxg== X-Gm-Message-State: AKwxytcwhk8LBIAQ8BYTSeNLZhaTLSPgzE682d1v7qO9HzyRa1VRsrM8 2h+1GUXjb0Ko0LOfJiIAp3jGUYkat3M= X-Received: by 10.28.112.4 with SMTP id l4mr1164673wmc.119.1515676129020; Thu, 11 Jan 2018 05:08:49 -0800 (PST) Received: from localhost (188.29.165.168.threembb.co.uk. [188.29.165.168]) by smtp.gmail.com with ESMTPSA id z81sm658098wmc.32.2018.01.11.05.08.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Jan 2018 05:08:48 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: [committed][AArch64] Avoid GET_MODE_NUNITS in v8.4 support Date: Thu, 11 Jan 2018 13:08:45 +0000 Message-ID: <87efmwlezm.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 This patch replaces GET_MODE_NUNITS in some of the v8.4 support with equivalent values, in preparation for the switch to NUM_POLY_INT_COEFFS==2. Tested on aarch64-linux-gnu and committed as an obvious extension of the previous patches. Richard 2018-01-11 Richard Sandiford gcc/ * config/aarch64/aarch64-simd.md (aarch64_fmll_low): Avoid GET_MODE_NUNITS. (aarch64_fmll_high): Likewise. (aarch64_fmll_lane_lowv2sf): Likewise. (aarch64_fmll_lane_highv2sf): Likewise. (aarch64_fmllq_laneq_lowv4sf): Likewise. (aarch64_fmllq_laneq_highv4sf): Likewise. (aarch64_fmll_laneq_lowv2sf): Likewise. (aarch64_fmll_laneq_highv2sf): Likewise. (aarch64_fmllq_lane_lowv4sf): Likewise. (aarch64_fmllq_lane_highv4sf): Likewise. Index: gcc/config/aarch64/aarch64-simd.md =================================================================== --- gcc/config/aarch64/aarch64-simd.md 2018-01-11 13:06:19.731271255 +0000 +++ gcc/config/aarch64/aarch64-simd.md 2018-01-11 13:06:36.797355218 +0000 @@ -6060,9 +6060,10 @@ (define_expand "aarch64_fmllmode); - rtx p1 = aarch64_simd_vect_par_cnst_half (mode, nunits, false); - rtx p2 = aarch64_simd_vect_par_cnst_half (mode, nunits, false); + rtx p1 = aarch64_simd_vect_par_cnst_half (mode, + * 2, false); + rtx p2 = aarch64_simd_vect_par_cnst_half (mode, + * 2, false); emit_insn (gen_aarch64_simd_fmll_low (operands[0], operands[1], @@ -6082,9 +6083,8 @@ (define_expand "aarch64_fmllmode); - rtx p1 = aarch64_simd_vect_par_cnst_half (mode, nunits, true); - rtx p2 = aarch64_simd_vect_par_cnst_half (mode, nunits, true); + rtx p1 = aarch64_simd_vect_par_cnst_half (mode, * 2, true); + rtx p2 = aarch64_simd_vect_par_cnst_half (mode, * 2, true); emit_insn (gen_aarch64_simd_fmll_high (operands[0], operands[1], @@ -6173,9 +6173,7 @@ (define_expand "aarch64_fmll_la VFMLA16_LOW))] "TARGET_F16FML" { - rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode, - GET_MODE_NUNITS (V4HFmode), - false); + rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode, 4, false); rtx lane = aarch64_endian_lane_rtx (V4HFmode, INTVAL (operands[4])); emit_insn (gen_aarch64_simd_fmll_lane_lowv2sf (operands[0], @@ -6196,9 +6194,7 @@ (define_expand "aarch64_fmll_la VFMLA16_HIGH))] "TARGET_F16FML" { - rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode, - GET_MODE_NUNITS (V4HFmode), - true); + rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode, 4, true); rtx lane = aarch64_endian_lane_rtx (V4HFmode, INTVAL (operands[4])); emit_insn (gen_aarch64_simd_fmll_lane_highv2sf (operands[0], @@ -6292,9 +6288,7 @@ (define_expand "aarch64_fmllq_l VFMLA16_LOW))] "TARGET_F16FML" { - rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode, - GET_MODE_NUNITS (V8HFmode), - false); + rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode, 8, false); rtx lane = aarch64_endian_lane_rtx (V8HFmode, INTVAL (operands[4])); emit_insn (gen_aarch64_simd_fmllq_laneq_lowv4sf (operands[0], @@ -6314,10 +6308,7 @@ (define_expand "aarch64_fmllq_l VFMLA16_HIGH))] "TARGET_F16FML" { - rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode, - GET_MODE_NUNITS (V8HFmode), - true); - + rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode, 8, true); rtx lane = aarch64_endian_lane_rtx (V8HFmode, INTVAL (operands[4])); emit_insn (gen_aarch64_simd_fmllq_laneq_highv4sf (operands[0], @@ -6411,9 +6402,7 @@ (define_expand "aarch64_fmll_la VFMLA16_LOW))] "TARGET_F16FML" { - rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode, - GET_MODE_NUNITS (V4HFmode), - false); + rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode, 4, false); rtx lane = aarch64_endian_lane_rtx (V8HFmode, INTVAL (operands[4])); emit_insn (gen_aarch64_simd_fmll_laneq_lowv2sf (operands[0], @@ -6434,9 +6423,7 @@ (define_expand "aarch64_fmll_la VFMLA16_HIGH))] "TARGET_F16FML" { - rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode, - GET_MODE_NUNITS(V4HFmode), - true); + rtx p1 = aarch64_simd_vect_par_cnst_half (V4HFmode, 4, true); rtx lane = aarch64_endian_lane_rtx (V8HFmode, INTVAL (operands[4])); emit_insn (gen_aarch64_simd_fmll_laneq_highv2sf (operands[0], @@ -6531,10 +6518,7 @@ (define_expand "aarch64_fmllq_l VFMLA16_LOW))] "TARGET_F16FML" { - rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode, - GET_MODE_NUNITS (V8HFmode), - false); - + rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode, 8, false); rtx lane = aarch64_endian_lane_rtx (V4HFmode, INTVAL (operands[4])); emit_insn (gen_aarch64_simd_fmllq_lane_lowv4sf (operands[0], @@ -6554,9 +6538,7 @@ (define_expand "aarch64_fmllq_l VFMLA16_HIGH))] "TARGET_F16FML" { - rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode, - GET_MODE_NUNITS (V8HFmode), - true); + rtx p1 = aarch64_simd_vect_par_cnst_half (V8HFmode, 8, true); rtx lane = aarch64_endian_lane_rtx (V4HFmode, INTVAL (operands[4])); emit_insn (gen_aarch64_simd_fmllq_lane_highv4sf (operands[0],