public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/105833] New: Dead Code Elimination Regression at -O2 (trunk vs. 12.1.0)
@ 2022-06-03 13:13 theodort at inf dot ethz.ch
2022-06-13 12:36 ` [Bug tree-optimization/105833] [13 Regression] " rguenth at gcc dot gnu.org
2023-02-21 14:25 ` rguenth at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: theodort at inf dot ethz.ch @ 2022-06-03 13:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105833
Bug ID: 105833
Summary: Dead Code Elimination Regression at -O2 (trunk vs.
12.1.0)
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: theodort at inf dot ethz.ch
Target Milestone: ---
cat case.c #4
void foo();
static int b;
static int **c;
static int ***d = &c;
static int ****e = &d;
static char(a)(char g, int h) { return h >= 2 ? g : g << h; }
int main() {
**e == 0;
b = b ? 4 : 0;
if (!a(*e != 0, b))
foo();
}
`gcc-1982fe2692b6c3b7f969ffc4edac59f9d4359e91 (trunk) -O2` can not eliminate
`foo` but `gcc-releases/gcc-12.1.0 -O2` can.
`gcc-1982fe2692b6c3b7f969ffc4edac59f9d4359e91 (trunk) -O2 -S -o /dev/stdout
case.c`
--------- OUTPUT ---------
main:
.LFB1:
.cfi_startproc
movl b(%rip), %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
sall $2, %eax
cmpq $0, d(%rip)
movl %eax, b(%rip)
je .L8
xorl %eax, %eax
ret
.L8:
pushq %rax
.cfi_def_cfa_offset 16
xorl %eax, %eax
call foo
xorl %eax, %eax
popq %rdx
.cfi_def_cfa_offset 8
ret
---------- END OUTPUT ---------
`gcc-releases/gcc-12.1.0 -O2 -S -o /dev/stdout case.c`
--------- OUTPUT ---------
main:
.LFB1:
.cfi_startproc
movl b(%rip), %edx
xorl %eax, %eax
testl %edx, %edx
setne %al
sall $2, %eax
movl %eax, b(%rip)
xorl %eax, %eax
ret
---------- END OUTPUT ---------
Bisects to:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b7501739f3b14ac7749aace93f636d021fd607f7
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/105833] [13 Regression] Dead Code Elimination Regression at -O2 (trunk vs. 12.1.0)
2022-06-03 13:13 [Bug tree-optimization/105833] New: Dead Code Elimination Regression at -O2 (trunk vs. 12.1.0) theodort at inf dot ethz.ch
@ 2022-06-13 12:36 ` rguenth at gcc dot gnu.org
2023-02-21 14:25 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-06-13 12:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105833
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Summary|Dead Code Elimination |[13 Regression] Dead Code
|Regression at -O2 (trunk |Elimination Regression at
|vs. 12.1.0) |-O2 (trunk vs. 12.1.0)
Target Milestone|--- |13.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/105833] [13 Regression] Dead Code Elimination Regression at -O2 (trunk vs. 12.1.0)
2022-06-03 13:13 [Bug tree-optimization/105833] New: Dead Code Elimination Regression at -O2 (trunk vs. 12.1.0) theodort at inf dot ethz.ch
2022-06-13 12:36 ` [Bug tree-optimization/105833] [13 Regression] " rguenth at gcc dot gnu.org
@ 2023-02-21 14:25 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-21 14:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105833
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Seems to be fixed now.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-21 14:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03 13:13 [Bug tree-optimization/105833] New: Dead Code Elimination Regression at -O2 (trunk vs. 12.1.0) theodort at inf dot ethz.ch
2022-06-13 12:36 ` [Bug tree-optimization/105833] [13 Regression] " rguenth at gcc dot gnu.org
2023-02-21 14:25 ` 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).