d7560e8968
rustc_codegen_ssa: use bitcasts instead of type punning for scalar transmutes. This specifically helps with `f32` <-> `u32` (`from_bits`, `to_bits`) in Rust-GPU (`rustc_codegen_spirv`), where (AFAIK) we don't yet have enough infrastructure to turn type punning memory accesses into SSA bitcasts. (There may be more instances, but the one I've seen myself is `f32::signum` from `num-traits` inspecting e.g. the sign bit) Sadly I've had to make an exception for `transmute`s between pointers and non-pointers, as LLVM disallows using `bitcast` for them. r? `@nagisa` cc `@khyperia` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.