From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by sourceware.org (Postfix) with ESMTPS id 714F738582B0 for ; Thu, 7 Jul 2022 16:07:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 714F738582B0 Received: by mail-pg1-x529.google.com with SMTP id 73so3932546pgb.10 for ; Thu, 07 Jul 2022 09:07:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=RZ74rx/2TQLKlGi7lU6aBFle6nZeCNjTB58u8v8pGDM=; b=k0bKG01umgz1YDYzqrOJsGc2ieUTmZn82W7AzBVPZ5rUUol1KLDewwUzfVQjuZ6tQw b/Ixa2rlcmMNFyJ2NohyaeIeoHWVSqucO5XOKETZheL12VbIwX64ZrW92HGuI+rmh1i0 Q8UEaCTYOIRps7nCPLlF7Z38EUTmDnfkZJV/4QeOOxpJukUDg0IL8R5tO76d8gemsz4y 7Bo/jmbaWCAP4EcnAQWTwyE4IGpHLJ3r3rEceq9sACiGMhoC7tBlL2TAsxWju8rd/64S hwmKKsFo17gpV5Ruf44gXkj+acv4GetC6vyAhzny2YtJwJQ0N6biHKgc4DZUpyneeMQW tiJw== X-Gm-Message-State: AJIora9aJi8DxjOx3jMQEE+4lC1NakQMARw0gdt0iL3uarZQp39s8zSr xYmlKTBlTIAIdiWcZ8n0NKpL/j68zVk= X-Google-Smtp-Source: AGRyM1sYytuBHiBV1kbhEIHx2aZ64l31RCgWFrSceH9fkDLQhAUT/XZFUedk+kgp9GDUj1BxopwYrg== X-Received: by 2002:a05:6a00:244f:b0:528:be6f:3935 with SMTP id d15-20020a056a00244f00b00528be6f3935mr9029465pfj.4.1657210074879; Thu, 07 Jul 2022 09:07:54 -0700 (PDT) Received: from [172.31.0.204] (c-73-63-24-84.hsd1.ut.comcast.net. [73.63.24.84]) by smtp.gmail.com with ESMTPSA id bd7-20020a056a00278700b0052090076426sm27929223pfb.19.2022.07.07.09.07.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Jul 2022 09:07:54 -0700 (PDT) Message-ID: <4b1704f1-7e0b-339b-e4d1-85436fde6c02@gmail.com> Date: Thu, 7 Jul 2022 10:07:53 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another. Content-Language: en-US To: gcc-patches@gcc.gnu.org References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2022 16:07:59 -0000 On 7/5/2022 8:09 PM, Andrew Pinski via Gcc-patches wrote: > > Not your fault but there are now like two different predicates for a > boolean like operand. > zero_one_valued_p and truth_valued_p and a third way to describe it is > to use SSA_NAME and check ssa_name_has_boolean_range. The latter is meant to catch cases where analysis indicates that a given SSA_NAME only takes on the values 0 or 1, regardless of the actual size of the SSA_NAME. It pre-dates having reasonable range information available in DOM and from reviewing the existing uses in DOM, I would expect Ranger to make most, if not all, of this code useless. jeff