diff options
| author | bors <bors@rust-lang.org> | 2021-04-18 14:39:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-18 14:39:34 +0000 |
| commit | ef8843428664c64a1681663f93f0dc4d2ce24276 (patch) | |
| tree | e02830a3cafd5e34a92b2a0faf1bbc965e154a7c /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | b021beeb6021d8885dc3f21e75a7f56502849633 (diff) | |
| parent | 487e27350a16e35f77ca471f368be3da28dac27c (diff) | |
| download | rust-ef8843428664c64a1681663f93f0dc4d2ce24276.tar.gz rust-ef8843428664c64a1681663f93f0dc4d2ce24276.zip | |
Auto merge of #84274 - nagisa:fix-simd, r=nikic
Don't set fast-math for the SIMD operations we set it for previously Instead of `fast-math`. `fast-math` implies things like functions not being able to accept as an argument or return as a result, say, `inf` which made these functions confusingly named or behaving incorrectly, depending on how you interpret it. It seems that the intended behaviour was to set a `afn` flag instead. In doing so we also renamed the intrinsics to say `_approx` so that it is clear these are not precision oriented and the users can act accordingly. Fixes #84268
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index d6db69c748f..ef27f04ae21 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -349,8 +349,10 @@ extern "C" void LLVMRustRemoveFunctionAttributes(LLVMValueRef Fn, F->setAttributes(PALNew); } -// enable fpmath flag UnsafeAlgebra -extern "C" void LLVMRustSetHasUnsafeAlgebra(LLVMValueRef V) { +// Enable a fast-math flag +// +// https://llvm.org/docs/LangRef.html#fast-math-flags +extern "C" void LLVMRustSetFastMath(LLVMValueRef V) { if (auto I = dyn_cast<Instruction>(unwrap<Value>(V))) { I->setFast(true); } |
