transmute::<u8, bool>()
generates bad code
#104832
Labels
A-codegen
Area: Code generation
C-bug
Category: This is a bug.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Generates (https://rust.godbolt.org/z/xzYdeffxq, note the redundant
and
):This is because we generate a redundant trunc/zext:
rust/compiler/rustc_codegen_ssa/src/mir/block.rs
Lines 1820 to 1824 in 1dda298
The text was updated successfully, but these errors were encountered: