From patchwork Wed May 1 05:05:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163181 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp4122373ill; Tue, 30 Apr 2019 22:09:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqz87lEfbXl2CafDgXgaQ6jcFT4ZvRsaQXwug3Fv2Wy5lxgU5yoX/RpApWEoijW/66VkKJSb X-Received: by 2002:adf:dccd:: with SMTP id x13mr2347006wrm.33.1556687344784; Tue, 30 Apr 2019 22:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556687344; cv=none; d=google.com; s=arc-20160816; b=BlqMG9W9igSEsCC7dpNaLs0wSxr0ror08U09PpnuBQw1R9C1MrAUujaq6D/P1jO0J6 pdZbrNwiuednleZlpGgwzE05Esl0PRSzXi3QnZIeKXkiHoU5kwMTsEpVtvxhThjCOIPx JNc9tlIb8oMGD0jNjPB4m1da0UG9Babe030pGi0eIxSixP0y0h6YUz8Kg61S6+92pxnh 6P2lhz6J1rFJmKbCG2CUiSikbQgvcMwCdNhcqqsUGbB/1i6WXfrDdPAr46VceMEJmE3S I/um5aQakrC564lzJtRcEIZeHzk2ILe0OK9NxwYukKJIhtFB2J7RAqDp0eJsn7gq8jHF J1sA== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=iaXmBLRJ4AetvIw8U8LEOO46+IUqp272JP0xIL80EUs=; b=FyK/GodTbIqy6ez6fqBZXp0RXGKI39VAwWZFctbi0Ubbd9SZTMV6Xk/PLJoPgSFMyf V+Zw5xKzaeng8ggy2b6d3c5f0ovsqZNuGKXey15YtMQHjC/BOtlDScpn3W8mJDEyv+H0 9YfxFvW5a7uChpZmLTTnXwgnS0TAsn7lsger0h19zeVf9/m4FCpEljaSwtWDD+vd30n8 emKKEnMM4uT+VnGBGWG4Mw4FXM5l66JO4Gf8CYneuLBH8hMQSeaP6RdPDNiANGyGnaNx DuHDLmrhUmT8O5jzitAa8p8Z1ao4lnXDN5FiKxjwsTbyCs77FZomXEyOqzxxZFm7AgKV tSHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bJpHG+XM; 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=fail (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 v13si27712471wrw.421.2019.04.30.22.09.04 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 30 Apr 2019 22:09:04 -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=fail header.i=@linaro.org header.s=google header.b=bJpHG+XM; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:36231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLhUN-0000Fn-Mi for patch@linaro.org; Wed, 01 May 2019 01:09:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLhRI-0006Kt-CF for qemu-devel@nongnu.org; Wed, 01 May 2019 01:05:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLhRE-0002o4-0u for qemu-devel@nongnu.org; Wed, 01 May 2019 01:05:52 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:44994) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hLhRD-0002nP-R1 for qemu-devel@nongnu.org; Wed, 01 May 2019 01:05:47 -0400 Received: by mail-pf1-x441.google.com with SMTP id y13so8131342pfm.11 for ; Tue, 30 Apr 2019 22:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=iaXmBLRJ4AetvIw8U8LEOO46+IUqp272JP0xIL80EUs=; b=bJpHG+XM9UHP61vhMXtcaKUHzVCkogXlwPAEtaxU7AaLE653zRzyOToaHJbyd66wUe AmdPT2g7oEubhmctL2Rwf/jzl48qp79Uzc6/Cjqb8rDq9JTsBjrLYFDlxHhphTS8Bufe N3tw9w+NaZd+0ZCeR8JBU94rhBmR5jBdDEiJatZFTWY7wOMZJA3PX9Huw4F4p2gDNBJ4 FneJBv2PidSECvG1y7CGKKut+y0c+MpOpLSOdCu7gHbRYkrbULBqrCL+JcD58qpbiIuD TiNLGGekouyMCYEsfznwc3vkF+xv7ZG7YaHa5RCBeQ7n/9Pe/O+4TM2ySXey800Szdra El0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=iaXmBLRJ4AetvIw8U8LEOO46+IUqp272JP0xIL80EUs=; b=imE5Sdc5PsVbceHedF+jolMhOqrWPXYRnujTX3mZAmZT4DnYEzLy5FpGe77dJB0YL/ KvdugtONcSPjqJYaIi+S+xHftq3GGhlPLjmHYCNq86c3go84A5U+YeCSNM8hZ33iFWTX fW/q9Uw8JKWHf1Fxj2VMlvOEm4Xr/j9rF907F0fxrXrZDRB53lWh4YWg0oaye6pehbb2 M1xT565d3/RyuGFxFK8++yQp9LXsdd067RcUKnj9OI1ShmR/7ombE+EhT06zmBCRMrrk OYPovdf357j+fJHNozZ6HL1iSHOO8+mnZnp+HcKHpAQ/ZobXzaKYDJHbV9phXgvuoB28 MXnQ== X-Gm-Message-State: APjAAAUR7UNUVmwQGhILH+/ve271PxVSvoTOxxMXOLPuNTjcbIiYT2ZV PRFUABv4G2oaH8eD6VfbsIF7f1LoTFo= X-Received: by 2002:a63:564f:: with SMTP id g15mr18297097pgm.258.1556687146456; Tue, 30 Apr 2019 22:05:46 -0700 (PDT) Received: from localhost.localdomain (97-113-189-189.tukw.qwest.net. [97.113.189.189]) by smtp.gmail.com with ESMTPSA id t127sm9687251pfb.106.2019.04.30.22.05.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Apr 2019 22:05:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 30 Apr 2019 22:05:09 -0700 Message-Id: <20190501050536.15580-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190501050536.15580-1-richard.henderson@linaro.org> References: <20190501050536.15580-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::441 Subject: [Qemu-devel] [PATCH v2 02/29] tcg: Do not recreate INDEX_op_neg_vec unless supported X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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" Use tcg_can_emit_vec_op instead of just TCG_TARGET_HAS_neg_vec, so that we check the type and vece for the actual operation. Signed-off-by: Richard Henderson --- tcg/optimize.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.17.1 Reviewed-by: Alex Bennée diff --git a/tcg/optimize.c b/tcg/optimize.c index 5150c38a25..24faa06260 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -734,9 +734,13 @@ void tcg_optimize(TCGContext *s) } else if (opc == INDEX_op_sub_i64) { neg_op = INDEX_op_neg_i64; have_neg = TCG_TARGET_HAS_neg_i64; - } else { + } else if (TCG_TARGET_HAS_neg_vec) { + TCGType type = TCGOP_VECL(op) + TCG_TYPE_V64; + unsigned vece = TCGOP_VECE(op); neg_op = INDEX_op_neg_vec; - have_neg = TCG_TARGET_HAS_neg_vec; + have_neg = tcg_can_emit_vec_op(neg_op, type, vece) > 0; + } else { + break; } if (!have_neg) { break;