From patchwork Wed Sep 9 00:16:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 249419 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp5018740ilg; Tue, 8 Sep 2020 17:29:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq21AUgmchie6SF4FepITPtqqK+2OEJFiUdwIwForuUl6LCax/u56xdvuw/wj7QPuFMmh/ X-Received: by 2002:a25:874d:: with SMTP id e13mr2434382ybn.68.1599611368834; Tue, 08 Sep 2020 17:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599611368; cv=none; d=google.com; s=arc-20160816; b=wCdtS7Os+dRHshFv8o7FsLUalxal6wl6HqC+nJS4/zt3JA7BCMXT5OPUigXFN95/h0 WuT1xX/orc78RlgfoCVGZMitGwOXwj3kiW0C6v2lmlu/+c9rhh+zPuU1gOEvE9nieq1x Jp1sPc3stupy4ExTsIWopwlXMbKuidOXLt0rY3dvtY8lcP3yfolBMNHwts57eqzjfvlJ jeQCNICyM6sI+JI2NP0KiF4qRIH50alJrvofRN5UiWNJJ9yO5oH9tEoDe/Ran06Ui5e6 B8wG4oAz7wwVv/D9yM7weYX9zO503f69CY3maqg59ueezoVjvpwolJ8jwahxDMLyAIto CMGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=5oTHhTIpHsSvQvico3TP/px05iIcGlpWqa7T/U3dIqI=; b=sOS19t8VjrkYf1qEdEOAQD1H/QmdcHIekJQCVXquYG45RhL7fX+aPHthiWphDaym/I siRq4+MwlgboYqV+botnTE7KKgsNci9DJN4AG4oYFZsHeTjzvmSUGujsZUR6EQJnmhn7 aMGK/uZQQABSNW873PoBKyuHQ5UZkCR/7UhFsFAd2+uok52nlvWUivNuXlUG2XA/6tRW VS3PVK41g+R8GBE4gR9aFhbptX8j7Nh0d8fDT934ZucvmCwBVq33ufmIE494nm1K/tay WueVjFT7Go3SfPOAve9YQXdUIsXFQnJhAkdZZ9AEq9bgay53jeLoainzsTh9TxK7JRGJ OTDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ed5ei2Zu; 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 80si1093066ybd.186.2020.09.08.17.29.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Sep 2020 17:29:28 -0700 (PDT) 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=ed5ei2Zu; 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]:38270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFnzM-0003Eo-BJ for patch@linaro.org; Tue, 08 Sep 2020 20:29:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFnnq-0000Zt-4R for qemu-devel@nongnu.org; Tue, 08 Sep 2020 20:17:34 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:34384) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFnno-0002Jl-Bi for qemu-devel@nongnu.org; Tue, 08 Sep 2020 20:17:33 -0400 Received: by mail-pj1-x1044.google.com with SMTP id n3so471079pjq.1 for ; Tue, 08 Sep 2020 17:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=5oTHhTIpHsSvQvico3TP/px05iIcGlpWqa7T/U3dIqI=; b=ed5ei2Zu3tRgX6uO1MfYoHHYNYfXG566IYYOg4vagiST50dBZ8qJrA3Hhga3Iop7ws kwK+4fwXNuUtDDMleYZwbvRRVxf5dzKekwRi/7DLUDJ6unB4G1pqNS0OM2oqeiNJQuSO mlxhOEdWkdBcFT7LbjgPWdR700KUjdlQRPItvgUaNQYciXLIMxIQDD6aNb/FJ398vm6E YpdO3pk2g6Knlw7Cv1czagf5aSeZsUe4ooy4iwbSVxfj9Uwq3m06arQrr26AaYP8OX9y wfUjdAw81nLA3yOUHQzQ1Q6F2m2aIiTKhQkEBRVBITRLsnLzof4ciIGMc0jN8ToAVFiD M9rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5oTHhTIpHsSvQvico3TP/px05iIcGlpWqa7T/U3dIqI=; b=sfx//6+s17dvSqtOO3IKTqCo42lWq8X2Ru9CDJ9DgcBibJS5TsCdcBPwc/xtFlDzmr Ia+QVXkKMS5Y7m13mj2rUxNy8K8vHjTZ5WkXe615uH8TihiOiwg1j7Ec4X48rQ7M6G+K 0hE2w51nFe9bjSeCiK4YYd/JKji0hr3Bs4zYfR83FcEibitJGlURaVzjyeyj9NHxp7Fn 7J7q+qb3Hg2bI9+V+V0Z5KELu3KSCliVm+ZdFhSeMzpFlzEXehJMdPoN8xOnMCFWWKww X0tTC4o1izqzxuvqfEPywT0TP7cf/Xjy+ZyeOxwHu9RInKFHk8QBYJod7vBqcFBX2mzl sw7w== X-Gm-Message-State: AOAM530j39NhC39k/2kVg/whvmoTenm7wB+kpaV9sl1B+y8SpyB9e8AH 1pPbdJfTc5K75OCRMsp4B/CDbz3aKT3suw== X-Received: by 2002:a17:90b:4c0f:: with SMTP id na15mr1160808pjb.119.1599610650603; Tue, 08 Sep 2020 17:17:30 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id 137sm505437pfu.149.2020.09.08.17.17.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 17:17:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 33/43] tcg/aarch64: Use tcg_constant_vec with tcg vec expanders Date: Tue, 8 Sep 2020 17:16:37 -0700 Message-Id: <20200909001647.532249-34-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200909001647.532249-1-richard.henderson@linaro.org> References: <20200909001647.532249-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1044.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: , 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 = -v, 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 fdc118391c..d9d397075a 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -2511,7 +2511,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); @@ -2543,8 +2543,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)); @@ -2557,9 +2557,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));