From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id F1FCF3858C3A for ; Wed, 6 Sep 2023 10:26:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F1FCF3858C3A 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-pg1-x536.google.com with SMTP id 41be03b00d2f7-56a3e6bce68so1885758a12.1 for ; Wed, 06 Sep 2023 03:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693995995; x=1694600795; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1HUweZWeb0DVj5hiZXiVngvxt3YFGY/98IZnN4tymCY=; b=Z2GNR3EshzE5KVEh5m3YTvNdBoC9DSaTaxhfn1b39aHxdc8Jx5xntNMOdG4x4bH+Hx se8vIBnx8x8CKFKsPl//4aYN+tlQJY9D/zrhgC20L3V7jwBamkLHUVFL24f+VOn3C5Ja x5nBBERG9OT9l26Z1wF9qEDXOSWPld0dEfL3oXM3RMTHz4soGx6ntNk4Lw+gqzVuqdsH njbUeVjQ8yok7UwQsXaK8x6SaZX5YwrFXOpmnPERVTJ6weIpWkheiNzGQGBIdqFqH74m OStHfABRJSKXSuJakxdz9RuMhR38Qk+kZIwu4OeATdT1HwT5fjIh15pjQSpzCv+3RgKS KDuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693995995; x=1694600795; h=content-transfer-encoding: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=1HUweZWeb0DVj5hiZXiVngvxt3YFGY/98IZnN4tymCY=; b=VweeYdx0bJOlPRVaOAv0mQ0Fm4ebEQ9ngIZEmAoO8M2Uxk98v0XSKYXjZRAqd37Qol w9MNhCyNu333Uf97GvQJqSEy8PgZ9t6ZAqD8ipRamDwFUpnqSGsniuwVwWuFjxTE2cNZ WBs+IHEtb4ELJp5IxK2heNOavLYPgO8JB40zEDhsyscUWyGT+m/KyESOhujlA/IJwvQ7 DxrFJopa1Y4L7IyG2Os9w5zxcnkbdxWnLArk6Re5x7Dl41vJFeBc4Hbuq9sW6mCBwFuk OQjQhm0ODuotk9s1gx1PWayyPEjTTUrSy2MsbzxuZ3dnoVTBu8duC5oWW8AoR47mo7GG n1eg== X-Gm-Message-State: AOJu0YybhpxkYT1BHs+WtJzfX+NLZ5VkFYw1iW6jUqt3LUhGT+iNHoGY lSvtipyKcjzZ/G2AIaZDHQANGix5MnziV7LBtYM= X-Google-Smtp-Source: AGHT+IGw/qOClxHHNNqzsWMrHFsWR55Cpr+HOS3KL/6ftoZTQHBUTU1LckKvD8wREwkkLQh5hKWqedWjhLJXVYzutpo= X-Received: by 2002:a17:90b:124a:b0:263:fc45:4091 with SMTP id gx10-20020a17090b124a00b00263fc454091mr11897755pjb.15.1693995994655; Wed, 06 Sep 2023 03:26:34 -0700 (PDT) MIME-Version: 1.0 References: <0164dc5a-35a7-2848-8153-5016f7582576.ref@yahoo.co.jp> <0164dc5a-35a7-2848-8153-5016f7582576@yahoo.co.jp> <8888cd4e-8168-5065-af35-5096aa24f37f@yahoo.co.jp> In-Reply-To: <8888cd4e-8168-5065-af35-5096aa24f37f@yahoo.co.jp> From: Max Filippov Date: Wed, 6 Sep 2023 03:26:23 -0700 Message-ID: Subject: Re: [PATCH] xtensa: Optimize boolean evaluation when SImode EQ/NE to zero if TARGET_MINMAX To: "Takayuki 'January June' Suwa" Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.7 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=ham 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 Tue, Sep 5, 2023 at 9:24=E2=80=AFPM Takayuki 'January June' Suwa wrote: > On 2023/09/06 8:01, Max Filippov wrote: > > On Tue, Sep 5, 2023 at 2:29=E2=80=AFAM Takayuki 'January June' Suwa > > wrote: > >> ;; after (prereq. TARGET_MINMAX) > >> test0: > >> movi.n a9, 1 > >> minu a2, a2, a9 > >> xor a2, a2, a9 > >> ret.n > > > > ISTM that test0 could be done with movnez in the same three instruction= s: > > > > movi a9, 1 > > movnez a2, a9, a2 > > xor a2, a2, a9 > > Unfortunately, the MOV[EQ/NE]Z machine instruction can only be used > to implement the functionality if the input and output physical registers > are the same (a2 in the example). Oh yeah, you're right, I missed that. --=20 Thanks. -- Max