public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111146] New: Some patterns in match.pd are no longer needed
@ 2023-08-25  1:31 pinskia at gcc dot gnu.org
  2023-08-25  1:31 ` [Bug tree-optimization/111146] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-25  1:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111146

            Bug ID: 111146
           Summary: Some patterns in match.pd are no longer needed
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

The following patterns now are no longer needed:
```
/* (x | y) & ~x -> y & ~x */
/* (x & y) | ~x -> y | ~x */
(for bitop (bit_and bit_ior)
     rbitop (bit_ior bit_and)
 (simplify
  (bitop:c (rbitop:c @0 @1) (bit_not@2 @0))
  (bitop @1 @2)))
```
Because they are covered by:
```
 /* (~x | y) & x -> x & y */
 /* (~x & y) | x -> x | y */
 (simplify
  (bitop:c (rbitop:c @2 @1) @0)
  (with { bool wascmp; }
   (if (bitwise_inverted_equal_p (@0, @2, wascmp)
        && (!wascmp || element_precision (type) == 1))
    (bitop @0 @1)))))
```

Just recording this so I can test and remove it soon.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tree-optimization/111146] Some patterns in match.pd are no longer needed
  2023-08-25  1:31 [Bug tree-optimization/111146] New: Some patterns in match.pd are no longer needed pinskia at gcc dot gnu.org
@ 2023-08-25  1:31 ` pinskia at gcc dot gnu.org
  2023-08-28 13:46 ` cvs-commit at gcc dot gnu.org
  2023-08-28 13:47 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-25  1:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111146

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-08-25

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tree-optimization/111146] Some patterns in match.pd are no longer needed
  2023-08-25  1:31 [Bug tree-optimization/111146] New: Some patterns in match.pd are no longer needed pinskia at gcc dot gnu.org
  2023-08-25  1:31 ` [Bug tree-optimization/111146] " pinskia at gcc dot gnu.org
@ 2023-08-28 13:46 ` cvs-commit at gcc dot gnu.org
  2023-08-28 13:47 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-28 13:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111146

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:cbde03abe5dbba13b992a3b610efe43aefc0e234

commit r14-3527-gcbde03abe5dbba13b992a3b610efe43aefc0e234
Author: Andrew Pinski <apinski@marvell.com>
Date:   Sun Aug 27 17:04:04 2023 -0700

    MATCH: Remove redundant pattern for `(x | y) & ~x`

    After r14-2885-gb9237226fdc938, this pattern becomes
    redundant as we match it using bitwise_inverted_equal_p.

    There is already a testcase (gcc.dg/nand.c) for this pattern
    and it still passes after the removal.

    OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

    gcc/ChangeLog:

            PR tree-optimization/111146
            * match.pd (`(x | y) & ~x`, `(x & y) | ~x`): Remove
            redundant pattern.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tree-optimization/111146] Some patterns in match.pd are no longer needed
  2023-08-25  1:31 [Bug tree-optimization/111146] New: Some patterns in match.pd are no longer needed pinskia at gcc dot gnu.org
  2023-08-25  1:31 ` [Bug tree-optimization/111146] " pinskia at gcc dot gnu.org
  2023-08-28 13:46 ` cvs-commit at gcc dot gnu.org
@ 2023-08-28 13:47 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-28 13:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111146

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |14.0
             Status|ASSIGNED                    |RESOLVED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-28 13:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25  1:31 [Bug tree-optimization/111146] New: Some patterns in match.pd are no longer needed pinskia at gcc dot gnu.org
2023-08-25  1:31 ` [Bug tree-optimization/111146] " pinskia at gcc dot gnu.org
2023-08-28 13:46 ` cvs-commit at gcc dot gnu.org
2023-08-28 13:47 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).