diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-01-22 17:28:23 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-01-24 07:18:02 -0800 |
| commit | 9eeecd2adad8c5c94348dbd1c61709fa49f65ff8 (patch) | |
| tree | ff0d5150f7c1f51572253122aa4c691c407e3eef /src/rustllvm/RustWrapper.cpp | |
| parent | 2a7ed74d96168fe1c187fbaa0d74dc52974b6ecf (diff) | |
| download | rust-9eeecd2adad8c5c94348dbd1c61709fa49f65ff8.tar.gz rust-9eeecd2adad8c5c94348dbd1c61709fa49f65ff8.zip | |
llvm6: Tweak fast math intrinsics
Looks like they did some refactoring of flags in the backend and this should catch us up! The "unsafe algebra" boolean has been split into a number of boolean flags for various operations, and this updates to use the `setFast` function which should hopefully have the same behavior as before. This was updated in llvm-mirror/llvm@00e900afd
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 0fe533d447b..3491e5a4aed 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -315,7 +315,11 @@ extern "C" void LLVMRustRemoveFunctionAttributes(LLVMValueRef Fn, // enable fpmath flag UnsafeAlgebra extern "C" void LLVMRustSetHasUnsafeAlgebra(LLVMValueRef V) { if (auto I = dyn_cast<Instruction>(unwrap<Value>(V))) { +#if LLVM_VERSION_GE(6, 0) + I->setFast(true); +#else I->setHasUnsafeAlgebra(true); +#endif } } |
