public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/100857] New: Simple common code sinking is not performed
@ 2021-06-01 15:14 nok.raven at gmail dot com
2021-06-02 7:58 ` [Bug tree-optimization/100857] " rguenth at gcc dot gnu.org
2021-06-03 5:42 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: nok.raven at gmail dot com @ 2021-06-01 15:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100857
Bug ID: 100857
Summary: Simple common code sinking is not performed
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: nok.raven at gmail dot com
Target Milestone: ---
void bar(int);
void foo(bool f)
{
if (f) {
bar(1);
}
else {
bar(2);
}
}
; GCC
foo(bool):
test dil, dil
je .L2
mov edi, 1
jmp bar(int)
.L2:
mov edi, 2
jmp bar(int)
; Clang
foo(bool):
mov eax, 2
sub eax, edi
mov edi, eax
jmp bar(int)
https://godbolt.org/z/4oEPY4ncb
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/100857] Simple common code sinking is not performed
2021-06-01 15:14 [Bug tree-optimization/100857] New: Simple common code sinking is not performed nok.raven at gmail dot com
@ 2021-06-02 7:58 ` rguenth at gcc dot gnu.org
2021-06-03 5:42 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-02 7:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100857
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-06-02
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
There's a duplicate of this PR. sink_common_stores_to_bb could be quite
easily enhanced to perform the desired transform on such simple testcases.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/100857] Simple common code sinking is not performed
2021-06-01 15:14 [Bug tree-optimization/100857] New: Simple common code sinking is not performed nok.raven at gmail dot com
2021-06-02 7:58 ` [Bug tree-optimization/100857] " rguenth at gcc dot gnu.org
@ 2021-06-03 5:42 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-06-03 5:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100857
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> There's a duplicate of this PR. sink_common_stores_to_bb could be quite
> easily enhanced to perform the desired transform on such simple testcases.
PR 13563.
*** This bug has been marked as a duplicate of bug 13563 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-03 5:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 15:14 [Bug tree-optimization/100857] New: Simple common code sinking is not performed nok.raven at gmail dot com
2021-06-02 7:58 ` [Bug tree-optimization/100857] " rguenth at gcc dot gnu.org
2021-06-03 5:42 ` 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).