From patchwork Fri Oct 29 04:33:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 516436 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp439671iml; Thu, 28 Oct 2021 22:51:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJww2FyhNm39EYRuofbgZ8tmXf3YD1oiBNr6Jq3Ad8EK8cYAbyynq5paB8q4KJUpKTjZIF2C X-Received: by 2002:aca:3c8b:: with SMTP id j133mr6494610oia.159.1635486672553; Thu, 28 Oct 2021 22:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635486672; cv=none; d=google.com; s=arc-20160816; b=cT9n2XlbFe60N5+UoH0vxZElihQEc7TAkg9mI2V/QFcwQq4oNgihGJN7GS2ayDya5G 2L9LCGNq/Ex5/6ongGYtUud+S49bHaCtE+2QJ6CQXDHXcX4gWdMA0z80bcCXOGXkPh5/ 3B/rja74ZwkZ51BLn1nayAzVAHN+ZgiqNFEDm8obhnfX5od/CU6YQyfxIT+eJTGkZo6v +famnG89ElM5SLbBCYJ6qBR31K3fnNGJ9BB6qvLhiFlfuQ0lhFWqnHKyqOrQ7E7Kj6hJ ROBeMvlBCDAGsv5BD9YTPmpfKjNaMnul+VoipKt5cfP33AfVLwpXNBG82H7JAybA8HWb QNSw== 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=94vBg5DwrKjzYyc2SPZ2xHl0Qntly4eUJLdtjM2QYhE=; b=i+T3PHzw1ekZLYIkPZ3LSBolKxxIVK6jbDAwPBsg6L74Z/P1kht43T31kBUlfy6B7W LjJ2EtmtQsRkm3fstONe2EToezaXVlEu7HqAOnHXzBM2jIOLVkmXrNQ/HnZ0k59eYV5M IW/ZpIsnOzBXHj6lUsD/TFeGiGudxHbRWrYXo+ttrt7QEoJ/MtzaaR9mQO7XWpxmdp41 3NO/uP+9LM7uFhi1/N7tvFcMCDfooPVn9pwJm1nGQsB0yxIDUfNDvZSyG0GXfrVIzaVi fpSCaZdCHANpvb90xKhpFFIxYk4hyDtQmmK6cZfYpseIQYHszGNv8q8uHo6D/jfJj2W9 03TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EFvuCQf7; 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 j26si4579658otl.252.2021.10.28.22.51.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Oct 2021 22:51:12 -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=EFvuCQf7; 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]:37572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgKnH-0005bC-TD for patch@linaro.org; Fri, 29 Oct 2021 01:51:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgJdn-0002Zs-TX for qemu-devel@nongnu.org; Fri, 29 Oct 2021 00:37:19 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:50794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgJdh-0000NQ-OY for qemu-devel@nongnu.org; Fri, 29 Oct 2021 00:37:19 -0400 Received: by mail-pj1-x102c.google.com with SMTP id gn3so6377245pjb.0 for ; Thu, 28 Oct 2021 21:37:12 -0700 (PDT) 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=94vBg5DwrKjzYyc2SPZ2xHl0Qntly4eUJLdtjM2QYhE=; b=EFvuCQf7bwDhPujdAHJj7zLgu03KSX9ztFCbmuYqc+PstihIU6GR5uZHN9FmGxg3Wi HntpobfWaQOp4c02bDDKNz4PIawuAECmu+vMOuTd/PLvTZPsXDkzt9qX3iZmcTqJSJS0 czRqeW/X5BrpgDfwS/uDF2PXO7l97ZMO6dfanWd51QYt3BN7o78ab1u7fxxVNpdwnwXP LW7bmA3c2VBGeTESBO6uXBwznjIg+JzM1Gw11eBfJeCq7VpiEnE3Ak8xQjo0/wI9mUyA ISS1WHg+4Sr8vcb6aoSAB4DKfLBsySVWhd3IYySx7H0LZ0g0YO7y3vNy9RKpNdAnwdvb 40VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=94vBg5DwrKjzYyc2SPZ2xHl0Qntly4eUJLdtjM2QYhE=; b=dO2dqPg+oq9MaGPYuo8w1eC+SjXs8av7rbF2nTyGM5wu6Y96v5gB7Oyg0RuM3QGeP0 DjDKUWRNovmVsBT4LzaJqmigW+BZhdKygPquadCmmbdQAdfu04K7LENYN6U0VjPQ6E7P g1clizZOjx+LYib6Q9xkT7aFhY03SVX+ZKNiAKDkFQG0+EyNVUnqXdvCjIhgVxoJJusn hwXdrMNNR/mQIEWlh/YL0+cUD+Cd/gZbDoCKodAPgKPtzTsZ2IuN3uLKk4S9XPUiP43q z3LbQIXbs9ZMMjXXLxITiwkog+hf0h51bpfYU40u4MJMVlXAcP88+7HR4AbDHAqOxKf4 ZyEw== X-Gm-Message-State: AOAM5307k/kKHpcjZgSvv0ac2851OQU/BEwfOriw7wGrLCwTG6+fE4H/ 4K/KQR38ay3D1+EUXUZYx4YE8oieZd7Bmw== X-Received: by 2002:a17:90b:4f88:: with SMTP id qe8mr17311357pjb.51.1635482231440; Thu, 28 Oct 2021 21:37:11 -0700 (PDT) Received: from localhost.localdomain (174-21-75-75.tukw.qwest.net. [174.21.75.75]) by smtp.gmail.com with ESMTPSA id b8sm5228232pfv.56.2021.10.28.21.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 21:37:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL v2 50/60] tcg/optimize: Use fold_xi_to_x for mul Date: Thu, 28 Oct 2021 21:33:19 -0700 Message-Id: <20211029043329.1518029-51-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029043329.1518029-1-richard.henderson@linaro.org> References: <20211029043329.1518029-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.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: Luis Pires , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Recognize the identity function for low-part multiply. Suggested-by: Luis Pires Reviewed-by: Luis Pires Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/tcg/optimize.c b/tcg/optimize.c index 6d795954f2..907049fb06 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1461,7 +1461,8 @@ static bool fold_movcond(OptContext *ctx, TCGOp *op) static bool fold_mul(OptContext *ctx, TCGOp *op) { if (fold_const2(ctx, op) || - fold_xi_to_i(ctx, op, 0)) { + fold_xi_to_i(ctx, op, 0) || + fold_xi_to_x(ctx, op, 1)) { return true; } return false;