You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scottmcm opened this issue
Mar 25, 2022
· 2 comments
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.I-slowIssue: Problems and improvements with respect to performance of generated code.
The text was updated successfully, but these errors were encountered:
scottmcm
added
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
labels
Mar 25, 2022
But I'll leave this open too because clang seems to optimize the equivalent switch fine (https://clang.godbolt.org/z/565Wcf8fK), so it's possible that in Rust we should be doing something better.
EDIT: oh, clang sexts before the switch. Here's a clang repro (using different types) https://clang.godbolt.org/z/57jqWxbxe, so I'll close this issue for now -- it can come back as E-needs-test when the upstream issue is fixed.
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.I-slowIssue: Problems and improvements with respect to performance of generated code.
Godbolt demo: https://rust.godbolt.org/z/Y35MWYxW8
Because
Ordering
has explicit discriminants, I expected these two functions to compile to the same thing:They don't, however:
Noticed while replying to https://users.rust-lang.org/t/std-ordering-as-integer/73450/5?u=scottmcm
The text was updated successfully, but these errors were encountered: