From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by sourceware.org (Postfix) with ESMTPS id BC0353858D28 for ; Tue, 31 Jan 2023 10:25:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BC0353858D28 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-lj1-x232.google.com with SMTP id y19so15449115ljq.7 for ; Tue, 31 Jan 2023 02:25:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MOk6hP7uPr2Q6XRqlYAp+FcKl5FxcOL1SROKrxvNGGQ=; b=poKRkMv98+6xQ4G+QpyXcu59PrIf+V0h/euy2LXPL7bfpOaa9+R+TwmMxdrZ4f9rEO LssG68xwxND+Uobii4ccC1/ZWCX/AQJcoG2vv0RFrOXi0hXB6VRQRy0oGa8I+Cm2H3qw vHksuffo1WW6xIug2GbWrbRYc09eVkhulhx0A5EKJnPJP3nd1pwNPlyNkGlp47Fo56n0 UIWqR6W+x9KMehJrJ0kHN18A+SnRIsiPLhQMdl7udVohWcKHspgi5SRiOuHLDsfbv5wy FXz9VGp9RQiJiwmvkzjSDfHLKvYWXhhZAb7SojhQkUiCakfuGqE3taV07vFeA1f7aoN/ 8vbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=MOk6hP7uPr2Q6XRqlYAp+FcKl5FxcOL1SROKrxvNGGQ=; b=ZIgftxZXSDEyn4EFwQJMB1Tmn77mIS3mzx/zSRxZX/Qgv5vNBWg+m59yT+nToFtL+Q DPtxSsY5BxvFwS7hs/W8imam66LyNGkb4jUyKiaAhmNLeJm0uWl9pIYos/dO4OQkCD6D GFaz9AX78kFnSYWkfhHNP5tQoLyNr8sfq5U78eRNR/5TprSgJHd6tJmPLk+nfOqbC0zU lpMOJKm0YG0EFg4ANWsKkmKuZMr9w0BAGgnUCd6xVIq3BiyLd3FJ3RqLxBaZOvxM+FL8 0A2778ET5eWt6pZem2eK8r9X1RYtd+Z56C+auaJwvskL/qq9jU+nCPal5NIuRfcj7SAd i0kw== X-Gm-Message-State: AO0yUKXlCydxbvjurZyPDGv52iGSNbx4L1Rxgd/le5kW313jHmb/hafY F+wFzACbInbYKZlyWhGM/mjSrbultm2iE03utNU= X-Google-Smtp-Source: AK7set+GwKGjstgaw8gq/pjGFJvd8Ql2wfiggjr5hBg0oV9MNFrdzzOTIcANO+T+jjg3KmJUJoj5H7KeZJpKF3YYW4w= X-Received: by 2002:a2e:3a0f:0:b0:28e:1ca4:b62 with SMTP id h15-20020a2e3a0f000000b0028e1ca40b62mr1821661lja.97.1675160704392; Tue, 31 Jan 2023 02:25:04 -0800 (PST) MIME-Version: 1.0 References: <64ec68a2-7a9f-4c20-0abe-7d36d7707ee4@redhat.com> In-Reply-To: <64ec68a2-7a9f-4c20-0abe-7d36d7707ee4@redhat.com> From: Richard Biener Date: Tue, 31 Jan 2023 11:24:52 +0100 Message-ID: Subject: Re: [PATCH 3/3] tree-optimization/108385 - Add op2_range to pointer_plus. To: Andrew MacLeod Cc: gcc-patches , "hernandez, aldy" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_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 Mon, Jan 30, 2023 at 8:47 PM Andrew MacLeod via Gcc-patches wrote: > > Implement op2_range for pointer_plus to determine the offset (operand 2) > is zero or non-zero based on equality/inequality between the LHS and op1. > > Fairly trivial fix for the PR, dependent on the first patch in the set > as it uses an accurate relation_trio in GORI to determine if LHS == OP1. > > > There was one tweak to GORI in that we use to stop calculating when the > LHS was varying. THis PR also exposed a case where the LHS is varying, > but a relation between the operands can still cause us to find a useful > result... ie > > VARYING = VARYING + OFFSET when LHS and OP1 are equal can produce a > non-zero OFFSET calculation. > > Bootstraps on x86_64-pc-linux-gnu with no regressions. OK for trunk? OK for the series. Thanks, Richard. > > Andrew >