From nobody Sun Jan 11 01:18:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767850304; cv=none; d=zohomail.com; s=zohoarc; b=kB64EFxNWKyDh/AaN5CM0nDqBhn4J+zCzJ4qEenLBP2rk88RBVj5M/otCYoZlH1jVm1BEWJzJOO59lTMTGZabMJ7TJP4Q/+CFs8WVGoirU7fgU62wh00ni4F6r6tvc6GoUnGROGLfAPlX2Qqmxagmm7kTpoPCG78MBszvM0c1Mo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767850304; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ij3Ceib4U8wNBcIbPBAFj13cL0r+CB0iw6bbk1bE3xI=; b=WcbbVT5GGPi2AvRmh/tW5r+eqvjtVJm4AXtHiHlJh5CeY4AV897wMvDpfIW5aT5zg8wAk5cP1TIHi7khW974HKMvK7TIHAaIyEbdA0XON5g+X/KYxgDWqARD4WsujQ+zEXOkNyHW0XrXa63pJsJH7qlFzr28vqVZe9rTzMLDsEI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767850303976796.8554866347017; Wed, 7 Jan 2026 21:31:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdicB-0007Ts-2N; Thu, 08 Jan 2026 00:31:19 -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 1vdic9-0007IV-A4 for qemu-devel@nongnu.org; Thu, 08 Jan 2026 00:31:17 -0500 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdic7-0005Sa-MG for qemu-devel@nongnu.org; Thu, 08 Jan 2026 00:31:17 -0500 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-7b89c1ce9easo2048784b3a.2 for ; Wed, 07 Jan 2026 21:31:15 -0800 (PST) Received: from stoup.. ([180.233.125.201]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c4cc05cd9d9sm7036552a12.16.2026.01.07.21.31.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jan 2026 21:31:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767850274; x=1768455074; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ij3Ceib4U8wNBcIbPBAFj13cL0r+CB0iw6bbk1bE3xI=; b=W9wJgitbALQfkbHkEPKazzcb63oy65RcMfZFF4otnrod1IbNFP5Jegu9IBzfne67QF D1B3IOtjUyWyBqUo1WvyaHoGBYGTBx/6Sbp036oNpLy8hyte3FAOIGPKbx+RY85ADQI3 aWtA6C8ppCnPRQV9iQ+eZYEttEoQYtOQ94X0fRoi1HqKMme5/DIoNR42n2N1Aup2VSjP HS/h17iZX5EVtIqb/4df43kGS+hZEPF02GlpiqkxYaOWA9HFfkZFqBwGmDtKFFyt83CG 7s3DvE1W2RoMfu2euwoo3d4lXGo28BTx6EBvB+mUG06Vw8OtKg3hTfLd8hACY7JweWr/ jpBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767850274; x=1768455074; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ij3Ceib4U8wNBcIbPBAFj13cL0r+CB0iw6bbk1bE3xI=; b=LM1lKIpsUIwGlclCKQxCWhnjsAhTPVZBfwGyC94b0zF3qwcCW6t1t+kbLtFAM3X98F 7iKWyAUeZY+RA3uBQhFqDXzU58QMe0Y/UPWnKzQI4EnJBUTVnqRAB3zlPn8fTP6F/mvV XUfW6VS9XbPofs4dlfn2EiaC/A9jhfaOuNkTGqho1kM/4E12TguZxLzxPiW0FINMRsCB Zl/Jjg3/Rao1b8X3AhC7cZ/7rDQiEhQbxqAtao7XojnlqUU7X+rgaastGMW5gQlUQ8af 2Ggrd0cf+Q8LomG8Z2oTvJBJf0dI7DJAlDJ4i7QWYnakCsxUlSE74Lbj8AqGmck9dGpG Luow== X-Gm-Message-State: AOJu0YzOcg1ZxI6Cnr9Gra2WyOmZmHix57oTowY4eEfvLfTDeD464EKZ r3i3oZbrRuQ3/t7IjcU+g1XUTvjcRZ5FWSeaLMfvhLmHCRECKqxBALjwhizACq1wILq42lK2puP o1+QdBDk= X-Gm-Gg: AY/fxX7tQfyG1OwEUzMNDFix2/apBWE9QY4r3HTuFR9jzAmTDTK/aXTiGON2M0eK4UP EnJ2dqnrXDSFT1fg1qNDPYjdXd0vqyRxV0SY1/mrfe9z6myeH4cDjF3+R/K1gb+Qje1u3IZt3tW KAEg6cVmPbe31WQCKx2uKrnd1DiemqwjX+XnhXYBQ2q3AdtNSQ3SCokb7ORQPnR1mOI1L5o5CLE WC2/NORF5Zr9JYl+TzYHV1x3oG14Plt8bkFNUtI7z/Kd5K7NXgssa3rc2LVzI/Dd6tErkCCrxum 6o+cFx3FoCsVc4jumfkOe+VK0e8p2ZWjmduuPaIA9ggEvNvRSnVqksiS1ZLwqGlBJPkCRe4m6c+ j8FrmJPqxglrLVwPywenBtiAhIlXglVfhOag1LLcc96xX2ibLSXgYZOwpFiA7Zm0+Rx8X2xrOKD y1fdbruV4gEBlzJgsd5bsIQ6sb0ATP X-Google-Smtp-Source: AGHT+IG9jY9Pf4p48VaFEXQLZoLl+M9SLPZQ4jOxjtsa3piqsiu0ufW9ExL+fNzbXaAp4WoJsTm5gg== X-Received: by 2002:a05:6a20:939f:b0:366:14ac:8c76 with SMTP id adf61e73a8af0-3898f9e2dcfmr4687313637.76.1767850274152; Wed, 07 Jan 2026 21:31:14 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 26/50] tcg: Drop TCG_TARGET_REG_BITS tests in tcg-op-gvec.c Date: Thu, 8 Jan 2026 16:29:54 +1100 Message-ID: <20260108053018.626690-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260108053018.626690-1-richard.henderson@linaro.org> References: <20260108053018.626690-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767850304992158500 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- tcg/tcg-op-gvec.c | 49 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c index 2cfc7e9409..bc323e2500 100644 --- a/tcg/tcg-op-gvec.c +++ b/tcg/tcg-op-gvec.c @@ -586,12 +586,11 @@ static void do_dup(unsigned vece, TCGv_ptr dbase, uin= t32_t dofs, } } =20 - /* Implement inline with a vector type, if possible. - * Prefer integer when 64-bit host and no variable dup. + /* + * Implement inline with a vector type, if possible; + * prefer_i64 with 64-bit variable dup. */ - type =3D choose_vector_type(NULL, vece, oprsz, - (TCG_TARGET_REG_BITS =3D=3D 64 && in_32 =3D= =3D NULL - && (in_64 =3D=3D NULL || vece =3D=3D MO_64)= )); + type =3D choose_vector_type(NULL, vece, oprsz, vece =3D=3D MO_64 && in= _64); if (type !=3D 0) { TCGv_vec t_vec =3D tcg_temp_new_vec(type); =20 @@ -612,11 +611,11 @@ static void do_dup(unsigned vece, TCGv_ptr dbase, uin= t32_t dofs, t_32 =3D NULL; =20 if (in_32) { - /* We are given a 32-bit variable input. For a 64-bit host, - use a 64-bit operation unless the 32-bit operation would - be simple enough. */ - if (TCG_TARGET_REG_BITS =3D=3D 64 - && (vece !=3D MO_32 || !check_size_impl(oprsz, 4))) { + /* + * We are given a 32-bit variable input. Use a 64-bit operati= on + * unless the 32-bit operation would be simple enough. + */ + if (vece !=3D MO_32 || !check_size_impl(oprsz, 4)) { t_64 =3D tcg_temp_ebb_new_i64(); tcg_gen_extu_i32_i64(t_64, in_32); tcg_gen_dup_i64(vece, t_64, t_64); @@ -629,14 +628,16 @@ static void do_dup(unsigned vece, TCGv_ptr dbase, uin= t32_t dofs, t_64 =3D tcg_temp_ebb_new_i64(); tcg_gen_dup_i64(vece, t_64, in_64); } else { - /* We are given a constant input. */ - /* For 64-bit hosts, use 64-bit constants for "simple" constan= ts - or when we'd need too many 32-bit stores, or when a 64-bit - constant is really required. */ + /* + * We are given a constant input. + * Use 64-bit constants for "simple" constants or when we'd + * need too many 32-bit stores, or when a 64-bit constant + * is really required. + */ if (vece =3D=3D MO_64 - || (TCG_TARGET_REG_BITS =3D=3D 64 - && (in_c =3D=3D 0 || in_c =3D=3D -1 - || !check_size_impl(oprsz, 4)))) { + || in_c =3D=3D 0 + || in_c =3D=3D -1 + || !check_size_impl(oprsz, 4)) { t_64 =3D tcg_constant_i64(in_c); } else { t_32 =3D tcg_constant_i32(in_c); @@ -3872,12 +3873,11 @@ void tcg_gen_gvec_cmp(TCGCond cond, unsigned vece, = uint32_t dofs, } =20 /* - * Implement inline with a vector type, if possible. - * Prefer integer when 64-bit host and 64-bit comparison. + * Implement inline with a vector type, if possible; + * prefer_i64 for a 64-bit comparison. */ hold_list =3D tcg_swap_vecop_list(cmp_list); - type =3D choose_vector_type(cmp_list, vece, oprsz, - TCG_TARGET_REG_BITS =3D=3D 64 && vece =3D=3D= MO_64); + type =3D choose_vector_type(cmp_list, vece, oprsz, vece =3D=3D MO_64); switch (type) { case TCG_TYPE_V256: /* Recall that ARM SVE allows vector sizes that are not a @@ -3992,11 +3992,10 @@ void tcg_gen_gvec_cmps(TCGCond cond, unsigned vece,= uint32_t dofs, } =20 /* - * Implement inline with a vector type, if possible. - * Prefer integer when 64-bit host and 64-bit comparison. + * Implement inline with a vector type, if possible; + * prefer_i64 for a 64-bit comparison. */ - type =3D choose_vector_type(cmp_list, vece, oprsz, - TCG_TARGET_REG_BITS =3D=3D 64 && vece =3D=3D= MO_64); + type =3D choose_vector_type(cmp_list, vece, oprsz, vece =3D=3D MO_64); if (type !=3D 0) { const TCGOpcode *hold_list =3D tcg_swap_vecop_list(cmp_list); TCGv_vec t_vec =3D tcg_temp_new_vec(type); --=20 2.43.0