From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) by sourceware.org (Postfix) with ESMTPS id EB13A3858014 for ; Thu, 24 Feb 2022 10:39:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EB13A3858014 Received: by mail-vs1-xe34.google.com with SMTP id w4so1653736vsq.1 for ; Thu, 24 Feb 2022 02:39:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U12GA/I84IPKwThmOXDv4lQ2WQOvHl0LUw22/H6w4bg=; b=EY3nx4vr7rirDEfa+r8CfPr7l3UcJvOrrrysYT0yR6BnAdYX8I1uRk025UWDVK4NUz TC4oeMlxDu4gIMdPpFstyIQyN0VBSlbB9h2S+DENB6fTrQutZ/4vfOTYmCe9vKUCiu3N bDyR/oKW01JpJ16zIfD4IAcHA9yGZc8HVUkk1sMV0ftEdFYm/943tQb/WOrmrrtWScw6 ryo6jmphuFacnZ1r20GOS6zHcXN5izrQAL7gj6v8dVp6S8Svz9YJ+wTD4UWb9xTUSEh+ wwvVGh2g62vZLWpjs6ywji0eCy11Fn8+9K6JJU04l0GkTWLFXUL1nzyMyZpQGDnD1DEe uO0A== X-Gm-Message-State: AOAM532Qqa4/p7QVaFS0qZWnx0x36kg68XGNL/uvCTri99rU05KmkiTA aL0wjZeCSGcmUE7ceKsZTNRznnOti8c4TLOic78= X-Google-Smtp-Source: ABdhPJzzDAU4zH9QzmdiFCbPOfrXYEwJNRbcCWezxkEThi+IDj0xNjQliqqnJlOfOMj2mpuIGoMGrRAOqjvDvVJpQVE= X-Received: by 2002:a67:e1c9:0:b0:31a:a108:4358 with SMTP id p9-20020a67e1c9000000b0031aa1084358mr956924vsl.8.1645699149476; Thu, 24 Feb 2022 02:39:09 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Andrew Pinski Date: Thu, 24 Feb 2022 02:38:56 -0800 Message-ID: Subject: Re: PR64454: (x % y) % y To: Marc Glisse Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" 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, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: Thu, 24 Feb 2022 10:39:11 -0000 On Thu, May 14, 2015 at 9:33 AM Marc Glisse wrote: > > Hello, > > after this patch I think I'll close the PR. This was regtested on > ppc64le-redhat-linux. > > Apparently I wrote this patch in a file that already had a trivial hunk: > -1-A -> ~A is rejected for complex while -A-1 isn't, there is no reason > for this difference (maybe there was before integer_all_onesp / > integer_minus_onep was introduced), I hope you don't mind. So this hunk actually was wrong in the end. PR 104675 is opened for the reason why it was wrong. -A-1 should also be rejected for complex types too. I will also notice the gimple verifiers should be catching BIT_* on the complex types as they don't make sense really but currently is not. Though that would be something for GCC 13. Thanks, Andrew Pinski > > I am wondering if we want some helper (like :c for commutative operations) > to avoid duplicating patterns for xx. We could also, when a > comparison x<=y doesn't simplify, see if !!(x<=y) simplifies better, but > that's becoming a bit complicated. > > 2015-05-15 Marc Glisse > > PR tree-optimization/64454 > gcc/ > * match.pd ((X % Y) % Y, (X % Y) < Y): New patterns. > (-1 - A -> ~A): Remove unnecessary condition. > gcc/testsuite/ > * gcc.dg/modmod.c: New testcase. > > -- > Marc Glisse