Message ID | 20241224200521.310066-43-richard.henderson@linaro.org |
---|---|
State | Accepted |
Commit | baff507e50fbcb270a1a7b448c2cc37cc7f9ec05 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp4083764wrq; Tue, 24 Dec 2024 12:14:42 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUIOXRX5sCuJV/syE1B+KcZFHo0pBSlP/OB0aciKdstaOCF1elqlVSrDBMqmkGseYK107tTiQ==@linaro.org X-Google-Smtp-Source: AGHT+IGF1VDP8PRzPaw7Ac0vDkcLfc5HTij/AXr8/Fw7oJVlQDZt33JFwXOYzBO8/5c4yLQa0Lx4 X-Received: by 2002:ac8:574a:0:b0:467:50b8:63aa with SMTP id d75a77b69052e-46a4a8eaed2mr297584551cf.28.1735071281938; Tue, 24 Dec 2024 12:14:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735071281; cv=none; d=google.com; s=arc-20240605; b=ZvyXn2OxQAo2C1+T2ibBf9JvRZjRaVDd3a3uo56cPISuD0OEbmgIxKidMjr0KhqsBn aJnYbjIu+GFf49R8OG3r0sddCN+JYCs2f987SolYMNou23NB/iO9xGC6THvkI4perxlm WEFKPCqPFlD2RImYHEX9xXf60w7W9WAU3+DD/uOGyza8sH/MS0LmZ7/nlzGOe9XUjnF/ lwe/YsSpRSTpjwGe0hj70ev+7B90B4epjUSVDrp5CHrk592nrwQMYW9TAXmPM1YjgnG6 kkhmp2jCUgXYxdxR8CwsXSgFCh8oPL0rysMX/8TwpoVUQMq/B5GQN0ERSkr3Xaf6xmKN VvZg== 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=Vqya82Y36HRWm92cvOJyTlH+EENkrrC20W65fSXxCcU=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=ByyAYbQfL5U1Puq3coaMTAefaY2i/Dhj59pryrypteugAFTdBJS9iRg0n1RRPHN9d0 CDBtLQ6NmUmH6FA+HmzsO45yQAjYPeN1kX+JbLTGU84j5XUktsDyWmyIJw87m+zEwYde u9yd/v5nCUDfQ8Yq0ZHq/OWeaJAhnOSBQc63JcS+5W2qUvydghcllHZKKaSlJVQHN9k3 fNLwud9PtdT+BlTmF0nfZf5lbO92vIoylirGXDtmSPManQ5THnLFxMonCVrcW/JaJXqT XPlf702EOH0qDgXxLqHF3X93qI5+Neg40BDK7m8WL4zx0sPtNE1QsYPITYaNkwIy2m91 YelQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eXpTnONW; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46a3e6816cfsi133881521cf.18.2024.12.24.12.14.41 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Dec 2024 12:14:41 -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=eXpTnONW; 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 <qemu-devel-bounces@nongnu.org>) id 1tQBDm-0008QG-FC; Tue, 24 Dec 2024 15:09:38 -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 <richard.henderson@linaro.org>) id 1tQBDF-0005kJ-4v for qemu-devel@nongnu.org; Tue, 24 Dec 2024 15:09:05 -0500 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1tQBDD-0002v6-KI for qemu-devel@nongnu.org; Tue, 24 Dec 2024 15:09:04 -0500 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-21670dce0a7so73943235ad.1 for <qemu-devel@nongnu.org>; Tue, 24 Dec 2024 12:09:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735070942; x=1735675742; 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=Vqya82Y36HRWm92cvOJyTlH+EENkrrC20W65fSXxCcU=; b=eXpTnONWs0aX4C+2om94tOcjCyePDt1LgYEhQQs857PlM7M1IQBcBiiTwg8sR8CUav mAqiLCPE0pKSgmz7kgR39LHUFDmxnPpj5sPqA6ie2vM3UktJjlZ4Tlwrf+Zx+cVNNVl0 +gDDXQ36xC8P45AE0fpfOxudjSb+B0eNCqU5mquJNyA/7EOK4wYf/YtFX3uscW5vIUxc bLDPwLdf369O2wvi4TJjRRni/A64yXrvT2PmoxPcRIu/kSOc372TUs0gTFGb4rKHyVkL rQ5HjrR6ZjWpoTwxQS0x9ZFbdK3vy2KBzmX+BzQntrzpzTjnDjdz/LGdYoYOrjSwAfrI WrsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735070942; x=1735675742; 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=Vqya82Y36HRWm92cvOJyTlH+EENkrrC20W65fSXxCcU=; b=RkuhOUzHOkKYARblQBlZEWJQa5CTXvVMXgBEPZzYdCOOg961rwoNV0c1vP3irmHBMi 9Z6nZLU+x0zPZvkcJLCT5CbEts8A8X+XtCizSYOQBwDdHBy1FfEzi8fjr0gNJoLijuRn 1roO3YlJnrYFN38rpsbZ03CjdXZH7Utcy/tFJvMJHdGGeTML105co7EbRzraJqhL/95B cvZ8pcSssv5+65mEi1Oo+Curuax4GWkYoY/A9mNO7kQaOx3OfwHljLeuU2hX+WD0NQ6b D0T8VivNjs4ZVGR/u8pgnyzWwG6i6j6kGhLMALLAfFMBrzlfkK74sn3DSm4St0c0yQgN 3Whg== X-Gm-Message-State: AOJu0YyqQ1ynORIMTnsmv1x/edLdVprbfjCx9BHiMHSwMd+5fdlRU0vc QPvOFM/3pF8IggWlzG3XrdmvzAugZGtr17p/WpC2+zUkzVDFh3IjV47HgMfbP3OpcM2dKE2RVCB wpzk= X-Gm-Gg: ASbGnctjq2RaNYr8xHn5cjBOihUFyV5GhYpQhl14lW3sOOAS6fLYpAIBrbPjD51p1mR x6wepr3HIjYvUD6hARVH5PWZQdw5joyaplB9iLL6YDmvWK5poPsIWgwk5bLWvHdkZoBB4zPl5FT k2UzG2N49X0eE3FsFKjXQ19RA+n/BKMAp3gAA2sw3fVZW7qUXXfm7EZxQx5LU0Ux7rTTQBcuky0 OYZTrhcdITXUx4NpHv1iBNDcAuk8qNegeEP+OY3wIfeCE778yxScX4kuP4zLJ8VX/wkT2CQ3dGP TBjco0DhflFXDoSUiSG3+4E9Ow== X-Received: by 2002:a05:6a21:9106:b0:1e0:d36b:ef5e with SMTP id adf61e73a8af0-1e5e0869165mr32263993637.46.1735070942351; Tue, 24 Dec 2024 12:09:02 -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-72aad8309acsm10033521b3a.45.2024.12.24.12.09.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2024 12:09:02 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PULL 42/72] tcg/optimize: Use fold_masks_zs in fold_sextract Date: Tue, 24 Dec 2024 12:04:51 -0800 Message-ID: <20241224200521.310066-43-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 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/72] tests/tcg: Do not use inttypes.h in multiarch/system/memory.c
|
expand
|
diff --git a/tcg/optimize.c b/tcg/optimize.c index 4090ffe12c..2d634c8925 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2507,31 +2507,25 @@ static bool fold_cmpsel_vec(OptContext *ctx, TCGOp *op) static bool fold_sextract(OptContext *ctx, TCGOp *op) { uint64_t z_mask, s_mask, s_mask_old; + TempOptInfo *t1 = arg_info(op->args[1]); int pos = op->args[2]; int len = op->args[3]; - if (arg_is_const(op->args[1])) { - uint64_t t; - - t = arg_info(op->args[1])->val; - t = sextract64(t, pos, len); - return tcg_opt_gen_movi(ctx, op, op->args[0], t); + if (ti_is_const(t1)) { + return tcg_opt_gen_movi(ctx, op, op->args[0], + sextract64(ti_const_val(t1), pos, len)); } - z_mask = arg_info(op->args[1])->z_mask; - z_mask = sextract64(z_mask, pos, len); - ctx->z_mask = z_mask; - - s_mask_old = arg_info(op->args[1])->s_mask; - s_mask = sextract64(s_mask_old, pos, len); - s_mask |= MAKE_64BIT_MASK(len, 64 - len); - ctx->s_mask = s_mask; + s_mask_old = t1->s_mask; + s_mask = s_mask_old >> pos; + s_mask |= -1ull << (len - 1); if (0 && pos == 0 && fold_affected_mask(ctx, op, s_mask & ~s_mask_old)) { return true; } - return fold_masks(ctx, op); + z_mask = sextract64(t1->z_mask, pos, len); + return fold_masks_zs(ctx, op, z_mask, s_mask); } static bool fold_shift(OptContext *ctx, TCGOp *op)