public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/115381] New: Missed deoptimization opportunity when comparing two different linker symbols
@ 2024-06-07 4:45 user202729 at protonmail dot com
2024-06-07 6:14 ` [Bug tree-optimization/115381] " rguenth at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: user202729 at protonmail dot com @ 2024-06-07 4:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115381
Bug ID: 115381
Summary: Missed deoptimization opportunity when comparing two
different linker symbols
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: user202729 at protonmail dot com
Target Milestone: ---
Code:
```
int x();
int y();
int z(){ return &x == &y; }
```
Clang optimizes this to 0. GCC doesn't.
Godbolt link: https://godbolt.org/z/8rGbbdrbe
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/115381] Missed deoptimization opportunity when comparing two different linker symbols
2024-06-07 4:45 [Bug tree-optimization/115381] New: Missed deoptimization opportunity when comparing two different linker symbols user202729 at protonmail dot com
@ 2024-06-07 6:14 ` rguenth at gcc dot gnu.org
2024-06-07 6:18 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-07 6:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115381
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
-fno-semantic-interposition
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/115381] Missed deoptimization opportunity when comparing two different linker symbols
2024-06-07 4:45 [Bug tree-optimization/115381] New: Missed deoptimization opportunity when comparing two different linker symbols user202729 at protonmail dot com
2024-06-07 6:14 ` [Bug tree-optimization/115381] " rguenth at gcc dot gnu.org
@ 2024-06-07 6:18 ` rguenth at gcc dot gnu.org
2024-06-07 14:16 ` pinskia at gcc dot gnu.org
2024-06-07 14:17 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-07 6:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115381
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-06-07
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
CC| |hubicka at gcc dot gnu.org
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Doesn't seem to help here. Related testcase:
extern int x;
extern int y;
int z(){ return &x == &y; }
possibly -fno-semantic-interposition doesn't cover the definitions being
aliases of each other. Defining TU:
int x(){}
int __attribute__((alias("x"))) y();
I believe this is wrong-code from clang.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/115381] Missed deoptimization opportunity when comparing two different linker symbols
2024-06-07 4:45 [Bug tree-optimization/115381] New: Missed deoptimization opportunity when comparing two different linker symbols user202729 at protonmail dot com
2024-06-07 6:14 ` [Bug tree-optimization/115381] " rguenth at gcc dot gnu.org
2024-06-07 6:18 ` rguenth at gcc dot gnu.org
@ 2024-06-07 14:16 ` pinskia at gcc dot gnu.org
2024-06-07 14:17 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-07 14:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115381
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=43565
Severity|normal |enhancement
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/115381] Missed deoptimization opportunity when comparing two different linker symbols
2024-06-07 4:45 [Bug tree-optimization/115381] New: Missed deoptimization opportunity when comparing two different linker symbols user202729 at protonmail dot com
` (2 preceding siblings ...)
2024-06-07 14:16 ` pinskia at gcc dot gnu.org
@ 2024-06-07 14:17 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-07 14:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115381
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Yes this is a dup of bug 43565.
*** This bug has been marked as a duplicate of bug 43565 ***
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-07 14:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-07 4:45 [Bug tree-optimization/115381] New: Missed deoptimization opportunity when comparing two different linker symbols user202729 at protonmail dot com
2024-06-07 6:14 ` [Bug tree-optimization/115381] " rguenth at gcc dot gnu.org
2024-06-07 6:18 ` rguenth at gcc dot gnu.org
2024-06-07 14:16 ` pinskia at gcc dot gnu.org
2024-06-07 14:17 ` 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).