[Bug middle-end/120278] [12/13/14/15 Regression] Switch expansion generates extra compares with -fno-jump-tables

2025-05-15 Thread selectstriker2 at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120278 --- Comment #10 from Ken Young --- "Correctness" (no dead code, no dead branches) matters more than performance in this instance.

[Bug middle-end/120278] [12/13/14/15 Regression] Switch expansion generates extra compares with -fno-jump-tables

2025-05-15 Thread selectstriker2 at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120278 --- Comment #12 from Ken Young --- For what it's worth, it has worked well for our simple bare metal ARM applications written in C and this is the first instance where the generated object code did extra things that were not expected.

[Bug middle-end/120278] [12/13/14/15 Regression] Switch expansion generates extra compares with -fno-jump-tables

2025-05-15 Thread selectstriker2 at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120278 --- Comment #8 from Ken Young --- It seems to me that even if a naive decision tree is to be generated, it could be done in a manner that simply checks for the case being equal and not do anything with greater than From: .L9: cmpl $4, -4(%rbp

[Bug middle-end/120278] [12/13/14/15 Regression] Switch expansion generates extra compares with -fno-jump-tables

2025-05-15 Thread selectstriker2 at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120278 --- Comment #7 from Ken Young --- I guess what I mean by "incorrect" is a branch tree where some of the branch nodes will never evaluate for both true and false conditions. I now see that the switch/case "cleanup" has been moved to an optimizat

[Bug middle-end/120278] [12/13/14/15 Regression] Switch expansion generates extra compares with -fno-jump-tables

2025-05-15 Thread selectstriker2 at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120278 --- Comment #5 from Ken Young --- So -O0 should be expected to generate incorrect decision trees for switch/case statements now in order to reduce some amount of compile time? Even though it used to correctly generate the decision tree?

[Bug tree-optimization/120278] New: [9/10/11/12/13/14/15 Regression] Switch expansion generates extra compares with -fno-jump-tables

2025-05-14 Thread selectstriker2 at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120278 Bug ID: 120278 Summary: [9/10/11/12/13/14/15 Regression] Switch expansion generates extra compares with -fno-jump-tables Product: gcc Version: 12.0 Status: UNCONFIRMED