From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id 1202D3858405 for ; Tue, 23 Nov 2021 20:03:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1202D3858405 Received: by mail-pg1-x530.google.com with SMTP id p17so102858pgj.2 for ; Tue, 23 Nov 2021 12:03:23 -0800 (PST) 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:cc:references:from:in-reply-to :content-transfer-encoding; bh=0V7fcAgw52Dg4g9OAip7PikTs0x+TAIw4IdNj1WuttA=; b=vTy9/l20XL+5+R/B0PWOKFYc6eyGnlVsdZsDe64N3D4ZvWzcbXPqxPd72aQ6aTGZxV qjE0C1WSvLv1hOMORZwbRJMurhWSHaLFXVF69tysrEhsgI31/PtW72SIwAJCVbNP2YX+ 8OAnsFnxAsBfWRNw6smnP+HJwDVz1L9tMFL6RC88ubJHrwQEksEd9FO9h3ZU5u2prXCw sr2YbEsb7EsnApjiH7FExEEUL4MrfOf8CGMnXCDOON9e19TYN7wndFVxU7VE3/GtaYeC NldZxz0tQJZjUnp/44YLkCid6W63dTtKmFSN8DqVE3eprWBaaOfs1PbRR9ujfsVR+rhL +aeA== X-Gm-Message-State: AOAM533hgE1ySMNHCaUFdhGz01lamKhtw30Vv0TSjiMtzsOcH2snLLxK CPeIt2wXC2RAHnGs+ySfSn8ImTdUgCk= X-Google-Smtp-Source: ABdhPJxxmUGN1ECi9kWu10pDPe3xXqG5O+KbYi8W3D6k2mHVGm+M63WbmwBUzxM1WJkrUZj+P/S4VQ== X-Received: by 2002:a63:cc09:: with SMTP id x9mr5783966pgf.349.1637697802012; Tue, 23 Nov 2021 12:03:22 -0800 (PST) Received: from [172.31.0.175] (c-98-202-48-222.hsd1.ut.comcast.net. [98.202.48.222]) by smtp.gmail.com with ESMTPSA id r8sm9804790pgp.30.2021.11.23.12.03.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Nov 2021 12:03:21 -0800 (PST) Message-ID: Date: Tue, 23 Nov 2021 13:03:21 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [EXTERNAL] Re: [PATCH][WIP] PR tree-optimization/101808 Boolean comparison simplification Content-Language: en-US To: Navid Rahimi , Andrew Pinski Cc: Navid Rahimi via Gcc-patches References: <0320449b-433b-1e27-732f-4fd3e17b76b6@gmail.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.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 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Tue, 23 Nov 2021 20:03:25 -0000 On 11/23/2021 12:55 PM, Navid Rahimi wrote: >> Did you test Ada with this patch as that is where the "odd" boolean >> types show up? > No I haven't tested Ada yet. Since it is work in progress still [WIP]. Quick question, to prevent applying this optimization to those odd Boolean types in Ada, there should be a check to check whether it is canonical boolean type or signed/unsigned, which should prevent messing with odd Boolean types in Ada. IIRC, you should check the type's precision.  THere should be examples you can find in one or more of the gimple optimizers. jeff