diff options
| author | bors <bors@rust-lang.org> | 2020-12-10 12:55:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-12-10 12:55:12 +0000 |
| commit | d7560e8968b4381f012173f97c166c952f691a56 (patch) | |
| tree | 9b51739f4a73725481dc260d4b54269a0e67f6e0 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 39b841dfe36f90a7cd111e7f0c55f32594f6e578 (diff) | |
| parent | 718fba92b0f319a271265df53fd0221447897311 (diff) | |
| download | rust-d7560e8968b4381f012173f97c166c952f691a56.tar.gz rust-d7560e8968b4381f012173f97c166c952f691a56.zip | |
Auto merge of #79801 - eddyb:scalar-transmute, r=nagisa
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`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
