From patchwork Tue Mar 7 18:34:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 659826 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2540880wrb; Tue, 7 Mar 2023 10:36:51 -0800 (PST) X-Google-Smtp-Source: AK7set/Ovhnq7UPwf9i/mehXo9Sjhn1WeiW5XaSawRgNrQk85rvfJVQltowE2m3QZuxD0O8Qouwx X-Received: by 2002:a05:622a:1988:b0:3b8:4951:57b8 with SMTP id u8-20020a05622a198800b003b8495157b8mr5985838qtc.15.1678214211158; Tue, 07 Mar 2023 10:36:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678214211; cv=none; d=google.com; s=arc-20160816; b=PqhiVnInUFS46+UsgjE9ORCR7l5E50v4iGw48snSgt3r9BggS/tOonM/idvC2ObDt6 UEXkoIkRvI3UouR4PjEnjPmPXE654Ud/M0oBzwqLrLBqh7++K84rx2SvvNVczQtqrOeV kRsw60dUToxJUVoYxwe0Y0RIMF1hbUpUVxsuAt51rSKwtcCrNue4yK2aisxHHaVFPub7 jBq63of4owoDq0uVtRWu3wzZDcqofWT1JYHQ+ZwwPoRme4kzMeV9zVTpXvvU8GBXgPoE 2HRqAOLjg9uPIHWOVYk0XgHnxYtzUQUaMWFnM9iinv2sj/GMzV26ysaVxrOvFaXDtTeC tH0Q== 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:cc:to :from:dkim-signature; bh=qxgDTYXHfeCSjrJ315R2/sC0Bf/gryvtVm2qasIqXas=; b=szqzNGnj5azfIk5iqgOW94anOc50kcJZymZrihO+4qTautugHs5UD5De63Z5zrWjZv bte6KkBx+YdJdwFztlPmobIQl3cIJZuWyfnqS+dkHuMVyfGakSr8SI0ZZP8OX/bItn6e R6jQVEpCZTM+WlJDhXLUtKGotwo/A7mLV1PokavOO2EPACRhrryx8l/292GBJ0uzHohK GcG5XDkJYFsgpnz87qbIFrCjLoFv4o8ozMEGXiSpYdgMn2Pdt8eQRSSgkAzwOy2XtkiH D8ZL54LiDnsslNKBo6FaoXj/yKUsmpPwKwc3bI1N4f+w9bMI4xtYHUsNPxoOZXxnVIZN oFwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JBlSMtO0; 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 c11-20020a05622a058b00b003b48f4a1cd7si9652032qtb.197.2023.03.07.10.36.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Mar 2023 10:36:51 -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=JBlSMtO0; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZc9c-0003cU-Ix; Tue, 07 Mar 2023 13:35:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZc9a-0003b0-T1 for qemu-devel@nongnu.org; Tue, 07 Mar 2023 13:35:14 -0500 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZc9Z-0007kC-BA for qemu-devel@nongnu.org; Tue, 07 Mar 2023 13:35:14 -0500 Received: by mail-pj1-x1031.google.com with SMTP id x34so14180532pjj.0 for ; Tue, 07 Mar 2023 10:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678214112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qxgDTYXHfeCSjrJ315R2/sC0Bf/gryvtVm2qasIqXas=; b=JBlSMtO0Q6li5r8PqzhUVH1ygRixH0eXpzeSeCzBMbIF8uUGzgrCnjEEh727j5pKZV ENNCp81svbBhzZWq+atvYgrvVKOS5aAE4u1Afrg7HTsdRHElW2dmhu5Fj+BlxoZi0ZRD xhkDalDVrxLyZN35XzEwcm5JFx7sF0Jc93LneyyZgETDb+Z1Id8hUNWd9LhuEZpooLX6 lMH4XoAnW9AMjJFvH1UigS4BSM/wSf390edrK3whT43iO+HOymIf3urJyGlDJorVHq5S VOIGSslzlKtyVLiyMyy0v2cmLbrSQSfZXK327VATRO/i7xWDowk2Cm9Vh0trHJQl+6rm G24w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678214112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qxgDTYXHfeCSjrJ315R2/sC0Bf/gryvtVm2qasIqXas=; b=1WzL/rsyNvpigFXOJ3bQHnbZoRasRh95zKepCpsPxIWKR5ze7DcylTFKdzAfHF1f1N gA2Cur/GUZs3yKL+mBjaEq3ijy9aP5kJYTHdpeUf9MmaRgu9epMbCDKj7uaiS+gjKIBj RkZLoaPV0K1HZkvHVS38xjU2ZYZbE/yJHaVX9Nmk9jKSH1FwPMCvxmDxHZGUQkSYxFES PYO4HOLEA3gKo575P+o2tXLg+BopbwUU3s6NDEabyyJdrh0jCXfPQ/iVt+bHxXnC/orK Jyf46odqOf9srBe+xPg3UldtuvQs6VLdxtbPwI3IrqE/QbgtjkNpdeVI/fm5jUsFRVrE tO2Q== X-Gm-Message-State: AO0yUKWKcZxH6jryLlAjT+uSlFFMtrAu6SfQu3bFSi+Hs0y5nQwbA8/q oaDGZUbe+UnZ+Lgx+zmD0sZPvxmA4K3cA2NgNUk= X-Received: by 2002:a17:90a:6485:b0:237:461c:b44d with SMTP id h5-20020a17090a648500b00237461cb44dmr15703734pjj.46.1678214112102; Tue, 07 Mar 2023 10:35:12 -0800 (PST) Received: from stoup.. ([2602:ae:154a:9f01:b1e0:bfd9:8b1a:efeb]) by smtp.gmail.com with ESMTPSA id q1-20020a17090a1b0100b0022c0a05229fsm7757940pjq.41.2023.03.07.10.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 10:35:11 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 10/25] target/arm: Avoid tcg_const_ptr in handle_vec_simd_sqshrn Date: Tue, 7 Mar 2023 10:34:48 -0800 Message-Id: <20230307183503.2512684-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230307183503.2512684-1-richard.henderson@linaro.org> References: <20230307183503.2512684-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1031.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.29 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-bounces+patch=linaro.org@nongnu.org It is easy enough to use mov instead of or-with-zero and relying on the optimizer to fold away the or. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 2ad7c48901..082a8b82dd 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -8459,7 +8459,7 @@ static void handle_vec_simd_sqshrn(DisasContext *s, bool is_scalar, bool is_q, tcg_rn = tcg_temp_new_i64(); tcg_rd = tcg_temp_new_i64(); tcg_rd_narrowed = tcg_temp_new_i32(); - tcg_final = tcg_const_i64(0); + tcg_final = tcg_temp_new_i64(); if (round) { tcg_round = tcg_constant_i64(1ULL << (shift - 1)); @@ -8473,7 +8473,11 @@ static void handle_vec_simd_sqshrn(DisasContext *s, bool is_scalar, bool is_q, false, is_u_shift, size+1, shift); narrowfn(tcg_rd_narrowed, cpu_env, tcg_rd); tcg_gen_extu_i32_i64(tcg_rd, tcg_rd_narrowed); - tcg_gen_deposit_i64(tcg_final, tcg_final, tcg_rd, esize * i, esize); + if (i == 0) { + tcg_gen_mov_i64(tcg_final, tcg_rd); + } else { + tcg_gen_deposit_i64(tcg_final, tcg_final, tcg_rd, esize * i, esize); + } } if (!is_q) {