From patchwork Thu Mar 9 20:05:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 661077 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp498329wrb; Thu, 9 Mar 2023 12:12:06 -0800 (PST) X-Google-Smtp-Source: AK7set+nndfyBOOfrpKBWFeVKNz7rj2BfrPAPOirirab9cnsizSSFb8GWfEG6sxLbTda98hn7Ma6 X-Received: by 2002:a05:600c:4f4d:b0:3e2:19b0:887d with SMTP id m13-20020a05600c4f4d00b003e219b0887dmr447207wmq.25.1678392726622; Thu, 09 Mar 2023 12:12:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678392726; cv=none; d=google.com; s=arc-20160816; b=0WCIzn2auC9ZN2zDDw/7q6K/xCrBWg9h12IwqwhawJLsevMSNIt/69NWl5QT8nOIKD YV4AY00W2ZgBa3CuXFslp8BpgXotoCEpBACf0/qy0SdiWGONnjJ9vGBDFyydLoGep+tY BgsQBIns0Y8AVEi0XuOFt+v1g7o2Orv7Ya8rsRaLsvDlNGUqekTTtZdOcqoSQ0Gd9h/W vO481HVkayGCgIzORLETckDJipJbGaZQoEiSZPBRV1Qec7b6GRQFJ0hiod+BWS3E7Er6 C4/p0fgRnl7qqLq3JrD3Dq3uB9bPESaNiFDCLXMDphN+Q3HDLABCFyFnyHqz71jkYt0U XhsQ== 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=PMJvppbhqOR2JCdX8coYPteuhsbAfAuc4eHGGh6HpwY9zKhaAdXm0SoUHeeEFGaUop HcWJXQbRId/JAwXk4atc9pJcg9hidFiOrInIWxE48fTim7sjksCA/NWwmgWk+prWvzBa uHDzgjSs+/RQzFA91O5rn/hQGDI/96uqQ6bdaGPWCORkqxhbyhsCvHfl274ieh0nkuqS 2cfanmlgecQpE5zTGbO69TepXNyqLY1+oo+ap0kaBPQ9wvCTXt/svOtYqFuP0bgnyWbA n3pd7aB1WBe933d8FlAWATDEIu+/zYUWyI6KaCyP0XdHzx82OUjUygIaC9lv/qbsh4DE LYdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mDlwwd4Y; 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 m8-20020a5d4a08000000b002ce7229c1b6si283096wrq.613.2023.03.09.12.12.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Mar 2023 12:12:06 -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=mDlwwd4Y; 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 1paMap-0006c5-Mu; Thu, 09 Mar 2023 15:10:29 -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 1paMaQ-0005aW-A9 for qemu-devel@nongnu.org; Thu, 09 Mar 2023 15:10:05 -0500 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paMaO-0001VQ-Ns for qemu-devel@nongnu.org; Thu, 09 Mar 2023 15:10:02 -0500 Received: by mail-pl1-x636.google.com with SMTP id ky4so3238470plb.3 for ; Thu, 09 Mar 2023 12:10:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678392600; 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=mDlwwd4Yr76a4DIvb0kqPix9AQAuIgvqdFNp6Ja5Js7orYiKRObgjiX0cp1R07SPQb vGmyQjYhbznSWhaITXWkAwLbmxjc57GyQ6mAP3WvkR8H42iusJw5ftOZQm1HkK+CtUKD uDyC5O/3fqlF58nMN2ld3pR5HXvD3cFDzWYXj4p/ihqZXe0PnSll4YSvsUfbjTEX8+kg pNvt7w8U1Bw34CSJ4ETs+ekmrwASX43hWfO1fy7rFgczSdRqfCnP3VZCh7b2k9i28f+W LOg7GKY8Y8ziavRzyZxwWQahl3OqzUPkwOr8wa4oGbJsk/+kiOWymM0HrZGkwDaQd60C ++ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678392600; 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=n5vU/IDfZTR+QiM0NSTFRp38CPa7K5bZOmbvmYoslzGh5Iyso7hv4NXvgxUNI26CGp oexQNwxCIdnFRbfljak81g50BE/g6Up2jeXGkAaBHsxOSAlD1w/+g995jVT9goNKVAZd vsGDyMorI12rQ9VSwge/sYXNeXc6xdT+gF3jKmpIi7KtwdI8NQT4wRpvtSoZv0Xwcdww 44jovJkdeJQuK9P4ctDijehy9R4WVX3BescM/TcmsifT+Q8b2W0HA9h0Yj4aoc7sFp3g pKl8Lk1u4CQ+nfBdSdJ/AdHhBv+rOcHofWFnC0sMnGRIZNWZRw4b7n0sX/9YuzxRYgqg AusQ== X-Gm-Message-State: AO0yUKX3tFhyKn0xQhmAKAXIzcC6zU/5pRd0wNSAOXgxGyG8UL15rlxh 5aREyYNUwvE8k9F24LitzRXxGz86K0lA4GemK1s= X-Received: by 2002:a17:903:1d2:b0:19d:19fb:55fd with SMTP id e18-20020a17090301d200b0019d19fb55fdmr2298375plh.20.1678392599720; Thu, 09 Mar 2023 12:09:59 -0800 (PST) Received: from stoup.. ([2602:ae:154a:9f01:bf7f:79a0:a976:bdaf]) by smtp.gmail.com with ESMTPSA id c2-20020a170902aa4200b001991e4e0bdcsm43797plr.233.2023.03.09.12.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 12:09:59 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL v2 77/91] target/arm: Avoid tcg_const_ptr in handle_vec_simd_sqshrn Date: Thu, 9 Mar 2023 12:05:36 -0800 Message-Id: <20230309200550.3878088-78-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230309200550.3878088-1-richard.henderson@linaro.org> References: <20230309200550.3878088-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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) {