From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 82E193858C20 for ; Tue, 16 May 2023 03:23:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 82E193858C20 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-x630.google.com with SMTP id d9443c01a7336-1ab1ce53ca6so97153915ad.0 for ; Mon, 15 May 2023 20:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684207426; x=1686799426; 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=o5JFXogpQV5u98y/4tTWyCTfFfXr8CEkiar4QW46elM=; b=M6fH7giVG0NcAcAj1gv7u9drx8nUeELu6F0Pp2X5WHr0/HXIRCT6RjNzXEzdcH/fAG sObC/5LAojOeUmiScbzGZcUKdk4tUT/9UC1LgIaGj1BUasJHY8+8mICURqOlmwB6TWPd 7dPtSzR+qYQIn8/KSMqfnkdQb+1JWAa2iehM+0fCAzmw74R/MkXtoUvNO+HfOFD2L06O 6h/avNT2A5kDjewLUsXY0RksR7wjJsSABit2isxyJLaC9pUQz89o1q1UcHZNBhYB0qJ7 xtauq2++RtXuHCvrtZ4L9/en9kRyFzIXCvr6rzgIUw5UHX0rVmb6yIDQ6HC/KWdBCAe7 u+aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684207426; x=1686799426; 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=o5JFXogpQV5u98y/4tTWyCTfFfXr8CEkiar4QW46elM=; b=aoCuOaTTzBl23VdYwWatpmemx8jDtNPR/uN9H8ydHPcijmNeCjakCh4vVpfebh4DVL m2iTv8qd4LNymd6Yqv4yY5ZJ2bWlYAv1AC8ZfPKXjZclOFqiHYrN4O//E/cfmdgcE9Yv gtDXyJJP3+ORpf4GRSQE1Fm3P7pJ+L+E2M9xh8ttEvUaaMmGydl2mQF1gYK5buDzpEsY imU9wW5IMIWz9z4qfEqcmEFuY3o4GC8JmzxLrYTzorcliUwD52zFxqA302sauwmNQ6/6 5UW+HHa8iBPv5OrnvHjorswr6TBxH2+ex6nSqk/PwphZYHzuZ0Lreecx+dfWpSqjxEkK ZIRg== X-Gm-Message-State: AC+VfDzKfE5fZeOEvndtbVXsmgQb6bNfuU/Hu9tC/jWYMczOqvcTvc9u IxdJvk3nejnQzu1/50HzeEA= X-Google-Smtp-Source: ACHHUZ5lDSv1qQE98iFH38xKL8Jfj97WuQz4IUGMl5R9q4QmzVOnOkB5trwQRwMglqnOemTGjsDHgg== X-Received: by 2002:a17:902:9a04:b0:1ad:bccc:af78 with SMTP id v4-20020a1709029a0400b001adbcccaf78mr20718418plp.58.1684207426307; Mon, 15 May 2023 20:23:46 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id k2-20020a170902c40200b001ae365072ccsm217216plk.122.2023.05.15.20.23.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 May 2023 20:23:45 -0700 (PDT) Message-ID: Date: Mon, 15 May 2023 21:23:44 -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] MATCH: [PR109424] Simplify min/max of boolean arguments Content-Language: en-US To: Andrew Pinski , gcc-patches@gcc.gnu.org References: <20230516013655.1660657-1-apinski@marvell.com> From: Jeff Law In-Reply-To: <20230516013655.1660657-1-apinski@marvell.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,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 5/15/23 19:36, Andrew Pinski via Gcc-patches wrote: > This is version 2 of https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577394.html > which does not depend on adding gimple_truth_valued_p at this point. > Instead will use zero_one_valued_p which is already used for mult simplifications > to make sure that we only have [0,1] rather having the mistake of maybe having [-1,0] > as the range for signed bools. > > This shows up in a few places in GCC itself but only at -O1, we miss the min/max conversion > because of PR 107888 (which I will be testing seperately). > > OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. > > Thanks, > Andrew Pinski > > PR tree-optimization/109424 > > gcc/ChangeLog: > > * match.pd: Add patterns for min/max of zero_one_valued > values to `&`/`|`. Not sure it buys us a whole lot. I guess the strongest argument is probably that turning it into a logical helps on targets without min/max support. OK. jeff