From patchwork Thu Jan 14 02:16:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 362798 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp68095jap; Wed, 13 Jan 2021 18:23:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzFS0yGjGe0C3lV6ZQTrFZlgnfpozKwhVkStXwo9iPcFTVT37zAMxWFKqt4Mp50zg6693Og X-Received: by 2002:a25:1182:: with SMTP id 124mr7239133ybr.154.1610591033079; Wed, 13 Jan 2021 18:23:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610591033; cv=none; d=google.com; s=arc-20160816; b=WISrcBM2qaK/whVCtS4062M2fc7IwModoWSkY1V4M+MkLk2o2S5x6OEoWM9a9eXTsA E7QpfNdkQX6NsxWAeEY+YDwiqzCvfoPrr7Ge8skLvll67O9gWm38iBOrt6sLzAaalE3L R9/lB2mmufElqsMj2cJNTbHyESVf3JvZxbWkZw/THUt8LIY4Z29AELerpA4PYuEgRSzP nUW4uheN+UOiknpfEFeDE32YEm89jPugmG11B5jCNkMJrY1No6wfje/c/Gxb87y1H+xe 6QWlhaMjrFojDIrlD02EUj/d3+V6JSluKMESs8+l8vcUylNNrZ10LNChZiFTFSUAPsb9 0ZRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=iIaMM78IeHTe5CD2a93HOKAFcWJMpXbVz88KGEPcLL4=; b=iAjeHgWyIyn0u7IdD1yAIpDY12y5rCBhu/N3NCYu8R9Z3kpjg/Ta6jritPI2dezXjf IIhR/4Q4TsGE2CNSMLX7grlm0AaTQvj+yll99DRT/UcfqGlvvsvGSAcZcLwDZd312itg aUogdxrGI7/RTApZWXrk9WqqgMkmrRDTM4QtRmPdDvyUWfPhuKbOwhajgifayY28JL/o yFhVHsqZA1oQLs5NFB2KpCw9hFkP/R6JhHZfHgnLJk00Z1Kn90WZcI2GYAXFxE29Gcwl 2LFSqwRMWK8FiqO8IRjOCHtl0r6/Z5lt+cccJks2i6XUIomEvF6Ai+hfa4zSTkljE8II AoEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k3u5wUwC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u12si3565732ybj.345.2021.01.13.18.23.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Jan 2021 18:23:53 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k3u5wUwC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzsIi-0003Ta-ID for patch@linaro.org; Wed, 13 Jan 2021 21:23:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzsCh-0003rp-Mo for qemu-devel@nongnu.org; Wed, 13 Jan 2021 21:17:39 -0500 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:36920) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzsCg-0003YA-2o for qemu-devel@nongnu.org; Wed, 13 Jan 2021 21:17:39 -0500 Received: by mail-pg1-x529.google.com with SMTP id z21so2747968pgj.4 for ; Wed, 13 Jan 2021 18:17:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iIaMM78IeHTe5CD2a93HOKAFcWJMpXbVz88KGEPcLL4=; b=k3u5wUwCwjOPW7JGYT/DFyEanMUvjUKXyKbbIp74A+rMV3WP1d7gKHWPGiBOBIPFEU 2Ji5c9EddqF5CPSkC8+6YxmsEO/vNrVgyqHCweVoxcy6JFzwlF0FoCvdAywVtJO1Haxr 7I9HvvdIW0LPovd/obTQTEE6aWh19BTsv5v8OsiDtFEIUuLgS5Bpyta74Lm1u8ZAUNjv 0b3tYmf0+x/J3ZxHhTNgeRuy9bonoW1FPJqeApyMLcCb+ZBINPIUmvpyHCsfNyJA0r2K mydg/IkbOYAyxoHYKKWXBiWrCC84lVn81foA31ZoEtGRuQGWlrRiZkGvGV1y1jQrkiVa 7rPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iIaMM78IeHTe5CD2a93HOKAFcWJMpXbVz88KGEPcLL4=; b=VhbyEunf8gniT1/JbO5z5mU04gBatSqzS+gbuLwMjswQObW8We+DvW+lnjbDeHYdkA zRAYHIjxYY2P7oAI510tQaDr7ax+3OPO7Ltd1x3vJ0/uTQmceGdWF6fJX4F3S2rnm6x7 VW2Tyzat7pffhMCBQOEDVej9KYRe7AJxjx10DR1mITPV5NIMUFOCmPo5mxr3GD2SrFYO c8LhB2AdU0uesL6WqFZpWPkgvZrKqc23bNol5EPHvN7SBdzu+U9aVb3IhrIgV7lN0rkg 6n6r/oIdO5LfTzWvB4DzsJ/Pm5DlYj4jbqwslQ+buJVR/WUb9mbrRNQpoXdePNRcqwnK 2SqQ== X-Gm-Message-State: AOAM531Et2AqA9J+2sEKsCQLZenEOeVxxM6ZVi3NQl/tN01qXCwnROtu YUSOYerA0X9CojJuydmaowT92NvCkI32GA== X-Received: by 2002:a62:5a86:0:b029:1ae:6b45:b6a9 with SMTP id o128-20020a625a860000b02901ae6b45b6a9mr5041478pfb.7.1610590656490; Wed, 13 Jan 2021 18:17:36 -0800 (PST) Received: from localhost.localdomain (rrcs-173-197-107-21.west.biz.rr.com. [173.197.107.21]) by smtp.gmail.com with ESMTPSA id i7sm3771687pfc.50.2021.01.13.18.17.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 18:17:35 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 23/24] tcg/aarch64: Use tcg_constant_vec with tcg vec expanders Date: Wed, 13 Jan 2021 16:16:53 -1000 Message-Id: <20210114021654.647242-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210114021654.647242-1-richard.henderson@linaro.org> References: <20210114021654.647242-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Improve rotrv_vec to reduce "t1 = -v2, t2 = t1 + c" to "t1 = -v2, t2 = c - v2". This avoids a serial dependency between t1 and t2. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.25.1 diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index e370b7e61c..23954ec7cf 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -2516,7 +2516,7 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, TCGArg a0, ...) { va_list va; - TCGv_vec v0, v1, v2, t1, t2; + TCGv_vec v0, v1, v2, t1, t2, c1; TCGArg a2; va_start(va, a0); @@ -2548,8 +2548,8 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, case INDEX_op_rotlv_vec: t1 = tcg_temp_new_vec(type); - tcg_gen_dupi_vec(vece, t1, 8 << vece); - tcg_gen_sub_vec(vece, t1, v2, t1); + c1 = tcg_constant_vec(type, vece, 8 << vece); + tcg_gen_sub_vec(vece, t1, v2, c1); /* Right shifts are negative left shifts for AArch64. */ vec_gen_3(INDEX_op_shlv_vec, type, vece, tcgv_vec_arg(t1), tcgv_vec_arg(v1), tcgv_vec_arg(t1)); @@ -2562,9 +2562,9 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, case INDEX_op_rotrv_vec: t1 = tcg_temp_new_vec(type); t2 = tcg_temp_new_vec(type); + c1 = tcg_constant_vec(type, vece, 8 << vece); tcg_gen_neg_vec(vece, t1, v2); - tcg_gen_dupi_vec(vece, t2, 8 << vece); - tcg_gen_add_vec(vece, t2, t1, t2); + tcg_gen_sub_vec(vece, t2, c1, v2); /* Right shifts are negative left shifts for AArch64. */ vec_gen_3(INDEX_op_shlv_vec, type, vece, tcgv_vec_arg(t1), tcgv_vec_arg(v1), tcgv_vec_arg(t1));