From patchwork Tue Dec 24 20:04:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 853239 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp4082258wrq; Tue, 24 Dec 2024 12:09:43 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVtQrYvNZOeHMMJKZiW6WpvJqHlRnhd9FA58+PD4odR3cqU4E7ZJTvHlH5rWHWLyD9eb1MnbA==@linaro.org X-Google-Smtp-Source: AGHT+IF48Zc0XFPKdQEDw/kvTeGdoCt8sUwtk2YpOVGGhoi5jnyNjofiwnZPnu5wpXUlnhuywrXV X-Received: by 2002:a05:620a:1a91:b0:7b1:ae6c:fc60 with SMTP id af79cd13be357-7b9ba6fda61mr2381155885a.8.1735070983624; Tue, 24 Dec 2024 12:09:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735070983; cv=none; d=google.com; s=arc-20240605; b=cBfpWVFoMyvvY4pX0vWXYDq7cZwGvvqUdvL+2wQyD9hyDmN1gAWHrrG6Rm0SnoIgfx HBGkvu02SAt3nbuof2yngViiYHxFJGDJDUjgGD3sT0/uWGaqeHC9ClqyKQPC8MLZb5O1 aOdG1LPcsaRPxwsUZmWy918HfJQFyHoiylAw8S73pvtqjYrvl/Mze7m0Y3ntsXX0emKd +U8SNurw0WZCyHwo68jvtG5tVMeZu3B88fAt8a4VkcWGd9fx0oIXM/dVZpe5PxIB4dfG QhFaJMDmWUWR1xRCOw5+eORbJVphmG8xr24CFO4oRBBwpBL8BaeUw0fd1RXGObuiBO35 pjmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=/BIzmSJg2IBNvRjDTAJOD5BUlfsyyTZSbfZK35bezBU=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=ir3oVYC6kJ6OsPdTO9qohaLUshwviPehTpKR6B0aFMkZtD3+f98F3OqHU8NdCU5GpC TMgK6iJY/uVo7wHU5CvZtYdzl5sa205tQ1MnFZP4coobCX2yTXXW5ugZ/6rRM+hnUYWO SDpl5ALdeA3CUKIdbDpI72guG2TStB440N6TRqHcGLNJOzZrLk0P29JO4XEB7GIzQB17 MAMa3T76Y2Vzf5ezY52m+ZH04qg/7hhPl4UMOvlWnJ88SZ6ssKOl79XBHnqHcZGQYJIZ 2vxoHh4SIDDSnytc3dvDqhtykcsiVz6LAIkUZi3YApYZ3wp3DTSNimLE1LVddqWLMhE4 1nFw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e9O7fo3m; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac55776asi1493305985a.687.2024.12.24.12.09.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Dec 2024 12:09:43 -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=e9O7fo3m; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQBAy-0004GW-DE; Tue, 24 Dec 2024 15:06:44 -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 1tQBAD-0002up-4m for qemu-devel@nongnu.org; Tue, 24 Dec 2024 15:05:58 -0500 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQBAB-0002d6-KQ for qemu-devel@nongnu.org; Tue, 24 Dec 2024 15:05:56 -0500 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-21683192bf9so61844195ad.3 for ; Tue, 24 Dec 2024 12:05:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735070754; x=1735675554; darn=nongnu.org; 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=/BIzmSJg2IBNvRjDTAJOD5BUlfsyyTZSbfZK35bezBU=; b=e9O7fo3m2xxQZD+MrWBnhPaYYVk39jM8kNseTGCP2PwzAIGJxHz6wzZCBlwZ2pknvH ftr8dAVn0GL/BxsbXJJPagP6xu9MPYRKpGgM0fZY3al0hy4r9buDBykwWNdTgG583gW7 VFvGfkYXgTI6CEsWoHHn+H7j25Gni/PLg72sOFBMLZeEHNc9xH3TpKJK5UQukGYCuvZY efSC5KgcEZ5JWbFnn1VTwpadJ+cUVIgG0YFzafUttIedmNkn9xz0/G8peH54AqgSBWz3 4nsVOSHmQHH5/hZLT/o/Cmbv0HuyWpVNkJ1g71OrZE/jiA26egFOvyLrG3bFqXwInje3 lFVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735070754; x=1735675554; 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=/BIzmSJg2IBNvRjDTAJOD5BUlfsyyTZSbfZK35bezBU=; b=jE3+F7T7IfIrLoemcrBTBuosM18mJtTPIgWI2KKGWCknws9Y5n3zdl+YC40kYgkD3Q r17DJHGrBmEHYO7P83QsBLGyNrQM+TIJpa+VOO9XnBaMAc01EBPoQm+chWRz0RAQKaCm IRTIs6ON4UJBJ2Bl0IkwnarbdpCiCEcw03wLp3fObD98TnYNtoqZoqhIOVETMNG+HBLI RGcEzjfaGtSkB+Qa9dyzqNrOJHAzAYE8bvBTa6jIdFBquqiXVfkJkaxOo+FEhgVRYWBu 4H6EIgkGnLOy1jOAloZXOjkAKkzUSV8H2Gn82GRk7NgCeIOPi2zUr87dUBlRcZPrMT7E 1Cpg== X-Gm-Message-State: AOJu0Yz2jek1ZIK6Yabuz3QBwQmJdlG9r9hT1fvklhO8laGZjY8O2b79 k0W/UlKdwbO5+EnC0d9X798gH9i7JACZt3PtGusTk13ZA8qF7ohWbQxMtv0SWCOutDyXtuDylIr 4H84= X-Gm-Gg: ASbGncumC008be/FFVDPpKvb6jZlq7adldF3fHLgHj32b2EsPhgRQmFHSdsT0P6+25c B8Ga5ty7Z5nK3NzrjZft8mcWHB+SlUJdKbWd0fDGpk2TzOT/OoClFUMDwsZWDPmMdCaJfN4KfN0 ZcivGcpv/TcbKGsTH2W5UgsTHIQjkKVKeVd5EXsAYiKvw91DWrQUDAZObkqZkSe1GOgCfGho4Y3 wdwCr0PF6BxMtc84HgdESbhD44ldc3cW4+3XtVanWjk0Rh9LY+OKFsdLti2wSLGrBckNyv9ZnRa L4EtWKPV7X89o8lbzgUjLfdviw== X-Received: by 2002:a05:6a21:3987:b0:1e1:ccfb:240 with SMTP id adf61e73a8af0-1e5e081d78cmr29133019637.41.1735070754356; Tue, 24 Dec 2024 12:05:54 -0800 (PST) Received: from stoup.. (syn-156-019-246-023.biz.spectrum.com. [156.19.246.23]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8fb895sm10027159b3a.162.2024.12.24.12.05.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2024 12:05:54 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 34/72] tcg/optimize: Return true from fold_qemu_st, fold_tcg_st Date: Tue, 24 Dec 2024 12:04:43 -0800 Message-ID: <20241224200521.310066-35-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241224200521.310066-1-richard.henderson@linaro.org> References: <20241224200521.310066-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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 Stores have no output operands, and so need no further work. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/optimize.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 7bd17a36c7..07792c5351 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2143,7 +2143,7 @@ static bool fold_qemu_st(OptContext *ctx, TCGOp *op) { /* Opcodes that touch guest memory stop the mb optimization. */ ctx->prev_mb = NULL; - return false; + return true; } static bool fold_remainder(OptContext *ctx, TCGOp *op) @@ -2706,7 +2706,7 @@ static bool fold_tcg_st(OptContext *ctx, TCGOp *op) if (op->args[1] != tcgv_ptr_arg(tcg_env)) { remove_mem_copy_all(ctx); - return false; + return true; } switch (op->opc) { @@ -2730,7 +2730,7 @@ static bool fold_tcg_st(OptContext *ctx, TCGOp *op) g_assert_not_reached(); } remove_mem_copy_in(ctx, ofs, ofs + lm1); - return false; + return true; } static bool fold_tcg_st_memcopy(OptContext *ctx, TCGOp *op) @@ -2740,8 +2740,7 @@ static bool fold_tcg_st_memcopy(OptContext *ctx, TCGOp *op) TCGType type; if (op->args[1] != tcgv_ptr_arg(tcg_env)) { - fold_tcg_st(ctx, op); - return false; + return fold_tcg_st(ctx, op); } src = arg_temp(op->args[0]); @@ -2763,7 +2762,7 @@ static bool fold_tcg_st_memcopy(OptContext *ctx, TCGOp *op) last = ofs + tcg_type_size(type) - 1; remove_mem_copy_in(ctx, ofs, last); record_mem_copy(ctx, type, src, ofs, last); - return false; + return true; } static bool fold_xor(OptContext *ctx, TCGOp *op)