-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Switch default destination not eliminated despite known value range #76085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
dickmao
pushed a commit
to commercial-emacs/commercial-emacs
that referenced
this issue
Dec 22, 2023
* src/eval.c (funcall_subr): Help the compiler by reducing aliasing problems, and compensate for a missed-optimisation bug in LLVM where switches sometimes forget to use variable range information (reported in llvm/llvm-project#76085).
dickmao
pushed a commit
to commercial-emacs/commercial-emacs
that referenced
this issue
Dec 22, 2023
* src/eval.c (funcall_subr): Help the compiler by reducing aliasing problems, and compensate for a missed-optimisation bug in LLVM where switches sometimes forget to use variable range information (reported in llvm/llvm-project#76085).
dtcxzyw
added a commit
that referenced
this issue
Jan 8, 2024
This patch eliminates unreachable default cases using range information. Fixes #76085.
Nice, thank you! |
justinfargnoli
pushed a commit
to justinfargnoli/llvm-project
that referenced
this issue
Jan 28, 2024
This patch eliminates unreachable default cases using range information. Fixes llvm#76085.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A fully populated switch with known value range (but no explicit
default
clause) will still generate a conditional jump to the default destination:results in a never-taken conditional branch to code that calls
canthappen
.llvm 18.0.0git (9f74e6e).
The text was updated successfully, but these errors were encountered: