public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/20083] Missed optimization with conditional and basically ||
[not found] <bug-20083-4@http.gcc.gnu.org/bugzilla/>
@ 2012-01-21 22:23 ` pinskia at gcc dot gnu.org
2021-06-03 0:56 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-21 22:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20083
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |pinskia at gcc dot gnu.org
|gnu.org |
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-21 22:04:34 UTC ---
I will take care of this one too.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/20083] Missed optimization with conditional and basically ||
[not found] <bug-20083-4@http.gcc.gnu.org/bugzilla/>
2012-01-21 22:23 ` [Bug tree-optimization/20083] Missed optimization with conditional and basically || pinskia at gcc dot gnu.org
@ 2021-06-03 0:56 ` pinskia at gcc dot gnu.org
2023-05-24 0:01 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-06-03 0:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20083
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |96923
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like only f is broken now.
in phiopt3:
_8 = i_4(D) != 0;
_9 = (int) _8;
if (j_5(D) != 0)
goto <bb 3>; [50.00%]
else
goto <bb 4>; [50.00%]
<bb 3> [local count: 536870913]:
<bb 4> [local count: 1073741824]:
# k_2 = PHI <_9(2), 1(3)>
if (l_6(D) != 0)
goto <bb 5>; [50.00%]
else
goto <bb 6>; [50.00%]
<bb 5> [local count: 536870913]:
<bb 6> [local count: 1073741824]:
# k_3 = PHI <k_2(4), 1(5)>
Hmm, this looks like it could be fixed with PR 96923. I will test it again
once I fix that one.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96923
[Bug 96923] Failure to optimize a select-related bool pattern to or+not
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/20083] Missed optimization with conditional and basically ||
[not found] <bug-20083-4@http.gcc.gnu.org/bugzilla/>
2012-01-21 22:23 ` [Bug tree-optimization/20083] Missed optimization with conditional and basically || pinskia at gcc dot gnu.org
2021-06-03 0:56 ` pinskia at gcc dot gnu.org
@ 2023-05-24 0:01 ` pinskia at gcc dot gnu.org
2023-05-24 0:03 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-24 0:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20083
Bug 20083 depends on bug 96923, which changed state.
Bug 96923 Summary: Failure to optimize a select-related bool pattern to or+not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96923
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |DUPLICATE
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/20083] Missed optimization with conditional and basically ||
[not found] <bug-20083-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2023-05-24 0:01 ` pinskia at gcc dot gnu.org
@ 2023-05-24 0:03 ` pinskia at gcc dot gnu.org
2023-06-07 0:30 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-24 0:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20083
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |89263
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The patch simple which fixes PR 89263.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89263
[Bug 89263] Simplify bool expression to OR
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/20083] Missed optimization with conditional and basically ||
[not found] <bug-20083-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2023-05-24 0:03 ` pinskia at gcc dot gnu.org
@ 2023-06-07 0:30 ` pinskia at gcc dot gnu.org
2023-06-07 2:43 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-07 0:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20083
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Patch submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620829.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/20083] Missed optimization with conditional and basically ||
[not found] <bug-20083-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2023-06-07 0:30 ` pinskia at gcc dot gnu.org
@ 2023-06-07 2:43 ` cvs-commit at gcc dot gnu.org
2023-06-07 2:45 ` pinskia at gcc dot gnu.org
2023-06-07 2:46 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-07 2:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20083
--- Comment #8 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:64d90d06d2db43538c8a45adbb3d74842f7868ae
commit r14-1597-g64d90d06d2db43538c8a45adbb3d74842f7868ae
Author: Andrew Pinski <apinski@marvell.com>
Date: Wed May 24 07:08:45 2023 +0000
Add match patterns for `a ? onezero : onezero` where one of the two
operands are constant
This adds a match pattern that are for boolean values
that optimizes `a ? onezero : 0` to `a & onezero` and
`a ? 1 : onezero` to `a | onezero`.
This was reported a few times and I thought I would finally
add the match pattern for this.
This hits a few times in GCC itself too.
Notes on the testcases:
* phi-opt-2.c: This now is optimized to `a & b` in phiopt rather than
ifcombine
* phi-opt-25b.c: The test part that was failing was parity which now gets
`x & y` treatment.
* ssa-thread-21.c: there is no longer a threading opportunity, so need to
disable phiopt.
Note PR 109957 is filed for the now missing optimization in that testcase
too.
gcc/ChangeLog:
PR tree-optimization/89263
PR tree-optimization/99069
PR tree-optimization/20083
PR tree-optimization/94898
* match.pd: Add patterns to optimize `a ? onezero : onezero` with
one of the operands are constant.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/phi-opt-2.c: Adjust the testcase.
* gcc.dg/tree-ssa/phi-opt-25b.c: Adjust the testcase.
* gcc.dg/tree-ssa/ssa-thread-21.c: Disable phiopt.
* gcc.dg/tree-ssa/phi-opt-27.c: New test.
* gcc.dg/tree-ssa/phi-opt-28.c: New test.
* gcc.dg/tree-ssa/phi-opt-29.c: New test.
* gcc.dg/tree-ssa/phi-opt-30.c: New test.
* gcc.dg/tree-ssa/phi-opt-31.c: New test.
* gcc.dg/tree-ssa/phi-opt-32.c: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/20083] Missed optimization with conditional and basically ||
[not found] <bug-20083-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2023-06-07 2:43 ` cvs-commit at gcc dot gnu.org
@ 2023-06-07 2:45 ` pinskia at gcc dot gnu.org
2023-06-07 2:46 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-07 2:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20083
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |14.0
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed finally (after 18 years) of messing around with PHI-OPT :).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/20083] Missed optimization with conditional and basically ||
[not found] <bug-20083-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2023-06-07 2:45 ` pinskia at gcc dot gnu.org
@ 2023-06-07 2:46 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-07 2:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20083
Bug 20083 depends on bug 89263, which changed state.
Bug 89263 Summary: Simplify bool expression to OR
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89263
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/20083] Missed optimization with conditional and basically ||
2005-02-19 22:54 [Bug tree-optimization/20083] New: " pinskia at gcc dot gnu dot org
@ 2005-02-23 1:29 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-23 1:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-22 18:27 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-02-22 18:27:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20083
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-06-07 2:46 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-20083-4@http.gcc.gnu.org/bugzilla/>
2012-01-21 22:23 ` [Bug tree-optimization/20083] Missed optimization with conditional and basically || pinskia at gcc dot gnu.org
2021-06-03 0:56 ` pinskia at gcc dot gnu.org
2023-05-24 0:01 ` pinskia at gcc dot gnu.org
2023-05-24 0:03 ` pinskia at gcc dot gnu.org
2023-06-07 0:30 ` pinskia at gcc dot gnu.org
2023-06-07 2:43 ` cvs-commit at gcc dot gnu.org
2023-06-07 2:45 ` pinskia at gcc dot gnu.org
2023-06-07 2:46 ` pinskia at gcc dot gnu.org
2005-02-19 22:54 [Bug tree-optimization/20083] New: " pinskia at gcc dot gnu dot org
2005-02-23 1:29 ` [Bug tree-optimization/20083] " pinskia at gcc dot gnu dot 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).