From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id BD19C3858C1F for ; Wed, 7 Jun 2023 22:45:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD19C3858C1F 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-pl1-x62f.google.com with SMTP id d9443c01a7336-1b025d26f4fso69572005ad.1 for ; Wed, 07 Jun 2023 15:45:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686177959; x=1688769959; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Xr6aluT+0rSSu67sB1vyG1upBplI6buBm3u9z8m91xY=; b=nmom8j6V3Vt7FrKbm5jG+RT3EOyUYkGbgLsFtu97ypuVgDrRMgiDwYybixrMmSzPjl oj1sdlUkTTMBaBiPbKcESMvrVIZbi/aRXVN90joLTEpeGYbWGBEsu4wnq92EkYq1c7tD qSjbFoMT4RlQblF7eWklZED9ovowTPD0DoFYZmuHR+tLQC5C5FJ2ZC6EBsxmt97DEIyX GUGtapV14GUy3Y0FjpzhT9wu9aWlvCI6dXyfGUnlgF1Gg3VthUGy7Uf7qGk05wPBDlmD sTHIctrvp9aAs3GmCctXLyxHi6d7fKwHiAfPBFRAzZdJUtJp/PxrnP7i3rmNNjy+wMLJ U32g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686177959; x=1688769959; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Xr6aluT+0rSSu67sB1vyG1upBplI6buBm3u9z8m91xY=; b=ICRNgaPbUIZKeiQt4IMoGVdR3teDUk3k4mvHcMEqPpMFYmGazii76wktENCSLiLcRl ouwzBP0ZUPog6DGa35d+Gndi35mCnfwQHByUQqVEjRa5XyaKbvCvzsNZ2VoJJ46Zkyj2 Y2tj7YIGlA0iTCvEFienVNoBGuE07ihzoui8bbb2bkzVUVeWjpearNiK+vDBKD0Bvx7/ nYUUrlCYTeHEvjrjXDUu9PWSoAs1HGDEcyPbZU8NVxLyyy00lBk4gTgNBLHb+3HkTzd0 TqahK26FHqFpO1wNHzciFTZvrYFA8O2ZNPrwPKR7i3rMnCgvWlnCrISHkQwpFa4wh8+9 4uwQ== X-Gm-Message-State: AC+VfDycejFAtOjifzXrdsbWQDMqpRqHLaVWTIh9i0Vbgf6h+T3FKoIe qHGOwb35Am6VnB4aG8T9DqnQxLhZo7Q= X-Google-Smtp-Source: ACHHUZ4PV4sjeMAXr9cXZvLPf/Sjd34btksYFsBELe9wdAQcv2bw7sNDsYL/xwVAc2N0oQ3g97I0fA== X-Received: by 2002:a17:902:d510:b0:1b1:c90e:b7c0 with SMTP id b16-20020a170902d51000b001b1c90eb7c0mr7258731plg.59.1686177958598; Wed, 07 Jun 2023 15:45:58 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id b4-20020a170902d50400b001ae0a4b1d3fsm14046plg.153.2023.06.07.15.45.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jun 2023 15:45:58 -0700 (PDT) Message-ID: <125dcdf0-02e5-e0e5-0841-a896532d4ced@gmail.com> Date: Wed, 7 Jun 2023 16:45:56 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 1/3] MATCH: Allow unsigned types for `X & -Y -> X * Y` pattern Content-Language: en-US To: Andrew Pinski , gcc-patches@gcc.gnu.org References: <20230607213217.3052696-1-apinski@marvell.com> From: Jeff Law In-Reply-To: <20230607213217.3052696-1-apinski@marvell.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 6/7/23 15:32, Andrew Pinski via Gcc-patches wrote: > This allows unsigned types if the inner type where the negation is > located has greater than or equal to precision than the outer type. > > branchless-cond.c needs to be updated since now we change it to > use a multiply rather than still having (-a)&c in there. > > OK? Bootstrapped and tested on x86_64-linux-gnu. > > gcc/ChangeLog: > > * match.pd (`X & -Y -> X * Y`): Allow for truncation > and the same type for unsigned types. > > gcc/testsuite/ChangeLog: > > * gcc.dg/tree-ssa/branchless-cond.c: Update testcase. OK. jeff