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.
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.
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
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
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?
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