From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by sourceware.org (Postfix) with ESMTPS id 2E7E23858D35 for ; Thu, 12 Jan 2023 12:46:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2E7E23858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-xb30.google.com with SMTP id 203so18473256yby.10 for ; Thu, 12 Jan 2023 04:46:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AlI2qRwwwT/2GYutV/HrHRD71kaLYfN8f6++jWoevHM=; b=jMgzvHdVcqIoPz9r8fI+wavvJd0VjmvWEoKaUb/tVeibvgv5XSgwfjQUyxHLCoEhwZ sa2Qe1EukG7Xrsfa14xq7f6vtoD46jYBlNqZnddQY6jrPbPqWT73gq/H/TRGtunxW6TJ 8FasEMgfzcILXAgnGN/AtjP2kgTVCJk5+lHerdTvYN7WEnTy7AvRbNpSkyUOFvanP6nh 4v85r5EvN3RFermE3ld6oy/KdQV5H643ezGN+c7X0t1SaTmD7wS/FdaHTQGlsTJ7bejG P/oyAnXOQor2rf6Vv2mMvxNgKJHUJLsZY6bfa+TA1duBfCEjaO0owm65iwNmeMny8QZj ljxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AlI2qRwwwT/2GYutV/HrHRD71kaLYfN8f6++jWoevHM=; b=Q3Xphf56Yc0lCIuSeaNseRvc7R0Q/s7HwS0YmI7H1vZVCQVtKPo2nTzWjnaZCNRVfX FLjop/aXOIrn+p69YsPLXNg53GkeAjZctmhIucHXg3TsiMnGpiYtT/sDb+OKv4WSiYIO BuYUyW9h2xtYz1usfEm1taPE+HdU1Tj8+Y8lHGzwqVm5RWTrymPYl3fdjb1xtbM4c0s6 ygeLoV8aGQGcyYGx8CK8JBpFoEhcnzKo7bVTYDztFT+RvZDIDwC420nKVz8RMB+MNQJ6 DC51nJ023rvzhJuUiw6uMcTq7/yzuqTDDw5BoOb+r6L/e15BNPk/KwhAvJ5wUPmGxMUI rzhQ== X-Gm-Message-State: AFqh2koLGzqSi3dU8Sqrv9KKoCPByGL0s1ZN5w695mwbpSkZVjD4r4jP g32jQ4hrT+PN/K7CtnbXzhvuYyVSydtZnvTdrmw= X-Google-Smtp-Source: AMrXdXvjzeNYBbeXXL9KuzbWX0e79gi+dYWH3xtYMgUqPEtmNPCZNTT0Im7h5jChHx3ZjztEmRmbe1snYuREsR8C5zo= X-Received: by 2002:a25:3257:0:b0:7b8:b82c:ab5d with SMTP id y84-20020a253257000000b007b8b82cab5dmr1824580yby.377.1673527588542; Thu, 12 Jan 2023 04:46:28 -0800 (PST) MIME-Version: 1.0 References: <92692f27-76e3-ce45-bc25-95b9a7d2b64f.ref@yahoo.co.jp> <92692f27-76e3-ce45-bc25-95b9a7d2b64f@yahoo.co.jp> In-Reply-To: <92692f27-76e3-ce45-bc25-95b9a7d2b64f@yahoo.co.jp> From: Max Filippov Date: Thu, 12 Jan 2023 04:46:17 -0800 Message-ID: Subject: Re: [PATCH 1/2] xtensa: Tune "*btrue" insn pattern To: "Takayuki 'January June' Suwa" Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Jan 11, 2023 at 8:26 PM Takayuki 'January June' Suwa wrote: > > This branch instruction has short encoding if EQ/NE comparison against > immediate zero when the Code Density Option is enabled, but its "length" > attribute was only for normal encoding. This patch fixes it. > > This patch also prevents undesireable replacement the comparison immediate > zero of the instruction (short encoding, as mentioned above) with a > register that has value of zero (normal encoding) by the postreload pass. > > gcc/ChangeLog: > > * config/xtensa/xtensa.md (*btrue): > Correct value of the attribute "length" that depends on > TARGET_DENSITY and operands, and add '?' character to the register > constraint of the compared operand. > --- > gcc/config/xtensa/xtensa.md | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max