public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110278] New: [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771
@ 2023-06-16 8:31 rguenth at gcc dot gnu.org
2023-06-16 8:32 ` [Bug tree-optimization/110278] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-16 8:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110278
Bug ID: 110278
Summary: [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c
scan-tree-dump-times optimized "link_error" 0 from
r14-1880-g827e208fa64771
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
r14-1880-g827e208fa64771 causes
FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error"
0
because we now fold more in .original:
- if (a ((unsigned int) ((0, 1) && b != 0) > b, (int) (short int) c) != 0)
+ if (a ((unsigned int) (b != 0) > b, (int) (short int) c) != 0)
the call to link_error was optimized away in threadfull1 before this change,
after the change code is straight-line and no jump threading opportunity
is realized.
Before we enter threadfull1 with
<bb 2> [local count: 1073741824]:
c.0_1 = c;
b.2_2 = b;
if (b.2_2 != 0)
goto <bb 4>; [50.00%]
else
goto <bb 3>; [50.00%]
<bb 3> [local count: 536870913]:
<bb 4> [local count: 1073741824]:
# iftmp.1_5 = PHI <1(2), 0(3)>
iftmp.3_3 = (unsigned int) iftmp.1_5;
_4 = b.2_2 < iftmp.3_3;
e.5_10 = (unsigned short) _4;
f.6_11 = (unsigned short) c.0_1;
_12 = e.5_10 * f.6_11;
if (_12 != 0)
goto <bb 5>; [33.00%]
else
goto <bb 6>; [67.00%]
<bb 5> [local count: 354334800]:
link_error ();
<bb 6> [local count: 1073741824]:
c = 0;
return 0;
but afterwards the b != 0 condition is in straight-line code:
<bb 2> [local count: 1073741824]:
c.0_1 = c;
b.1_2 = b;
_3 = b.1_2 != 0;
_4 = (unsigned int) _3;
_5 = b.1_2 < _4;
e.3_10 = (unsigned short) _5;
f.4_11 = (unsigned short) c.0_1;
_12 = e.3_10 * f.4_11;
if (_12 != 0)
goto <bb 3>; [33.00%]
else
goto <bb 4>; [67.00%]
<bb 3> [local count: 354334800]:
link_error ();
<bb 4> [local count: 1073741824]:
c = 0;
return 0;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/110278] [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771
2023-06-16 8:31 [Bug tree-optimization/110278] New: [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771 rguenth at gcc dot gnu.org
@ 2023-06-16 8:32 ` rguenth at gcc dot gnu.org
2023-06-16 9:26 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-16 8:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110278
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Target Milestone|--- |14.0
Blocks| |110269
Known to work| |13.1.0
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110269
[Bug 110269] [13 Regression] Missed Dead Code Elimination when using
__builtin_unreachable since r13-4607-g2dc5d6b1e7e
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/110278] [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771
2023-06-16 8:31 [Bug tree-optimization/110278] New: [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771 rguenth at gcc dot gnu.org
2023-06-16 8:32 ` [Bug tree-optimization/110278] " rguenth at gcc dot gnu.org
@ 2023-06-16 9:26 ` rguenth at gcc dot gnu.org
2023-06-16 9:47 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-16 9:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110278
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So looks like we're missing simplification of
uns < (typeof uns)(uns != 0)
which we managed to prove is false. When uns != 0 then this is uns < 1
which is false so uns == 0 but then uns < 0 is also false.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/110278] [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771
2023-06-16 8:31 [Bug tree-optimization/110278] New: [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771 rguenth at gcc dot gnu.org
2023-06-16 8:32 ` [Bug tree-optimization/110278] " rguenth at gcc dot gnu.org
2023-06-16 9:26 ` rguenth at gcc dot gnu.org
@ 2023-06-16 9:47 ` rguenth at gcc dot gnu.org
2023-06-16 9:49 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-16 9:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110278
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
And x != (typeof x)(x == 0) is always true, the only other related one I could
come up with. That's optimized for _Bool but not integer types.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/110278] [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771
2023-06-16 8:31 [Bug tree-optimization/110278] New: [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771 rguenth at gcc dot gnu.org
` (2 preceding siblings ...)
2023-06-16 9:47 ` rguenth at gcc dot gnu.org
@ 2023-06-16 9:49 ` rguenth at gcc dot gnu.org
2023-06-16 11:46 ` cvs-commit at gcc dot gnu.org
2023-06-16 11:46 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-16 9:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110278
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2023-06-16
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/110278] [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771
2023-06-16 8:31 [Bug tree-optimization/110278] New: [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771 rguenth at gcc dot gnu.org
` (3 preceding siblings ...)
2023-06-16 9:49 ` rguenth at gcc dot gnu.org
@ 2023-06-16 11:46 ` cvs-commit at gcc dot gnu.org
2023-06-16 11:46 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-16 11:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110278
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:69b04fe7445c88edafd6983e28353a158e4314b5
commit r14-1883-g69b04fe7445c88edafd6983e28353a158e4314b5
Author: Richard Biener <rguenther@suse.de>
Date: Fri Jun 16 11:47:45 2023 +0200
tree-optimization/110278 - uns < (typeof uns)(uns != 0) is always false
The following adds two patterns simplifying comparisons,
uns < (typeof uns)(uns != 0) is always false and x != (typeof x)(x == 0)
is always true.
PR tree-optimization/110278
* match.pd (uns < (typeof uns)(uns != 0) -> false): New.
(x != (typeof x)(x == 0) -> true): Likewise.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/110278] [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771
2023-06-16 8:31 [Bug tree-optimization/110278] New: [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771 rguenth at gcc dot gnu.org
` (4 preceding siblings ...)
2023-06-16 11:46 ` cvs-commit at gcc dot gnu.org
@ 2023-06-16 11:46 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-16 11:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110278
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-06-16 11:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-16 8:31 [Bug tree-optimization/110278] New: [14 Regression] FAIL: gcc.dg/tree-ssa/pr103257-1.c scan-tree-dump-times optimized "link_error" 0 from r14-1880-g827e208fa64771 rguenth at gcc dot gnu.org
2023-06-16 8:32 ` [Bug tree-optimization/110278] " rguenth at gcc dot gnu.org
2023-06-16 9:26 ` rguenth at gcc dot gnu.org
2023-06-16 9:47 ` rguenth at gcc dot gnu.org
2023-06-16 9:49 ` rguenth at gcc dot gnu.org
2023-06-16 11:46 ` cvs-commit at gcc dot gnu.org
2023-06-16 11:46 ` rguenth 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).