about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-07-23 00:42:20 -0700
committerGitHub <noreply@github.com>2020-07-23 00:42:20 -0700
commit8f02f2c1abd6c3fbd3053da5bb6759a4698a949e (patch)
tree0cc12f3bfc663fa6ce450c41adb99ad383b03dca /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parente9d41344673d5f22f3ea82b9f30595017e317e5b (diff)
parent618aeec51f61fb6d80cd4fde9e5fc3b9714ca72b (diff)
downloadrust-8f02f2c1abd6c3fbd3053da5bb6759a4698a949e.tar.gz
rust-8f02f2c1abd6c3fbd3053da5bb6759a4698a949e.zip
Rollup merge of #74659 - alexcrichton:wasm-codegen, r=varkor
Improve codegen for unchecked float casts on wasm

This commit improves codegen for unchecked casts on WebAssembly targets
to use the singluar `iNN.trunc_fMM_{u,s}` instructions. Previously rustc
would codegen a bare `fptosi` and `fptoui` for float casts but for
WebAssembly targets the codegen for these instructions is quite large.
This large codegen is due to the fact that LLVM can speculate these
instructions so the trapping behavior of WebAssembly needs to be
protected against in case they're speculated.

The change here is to update the codegen for the unchecked cast
intrinsics to have a wasm-specific case where they call the appropriate
LLVM intrinsic to generate the right wasm instruction. The intrinsic is
explicitly opting-in to undefined behavior so a trap here for
out-of-bounds inputs on wasm should be acceptable.

cc #73591
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions