mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
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
This commit is contained in:
parent
2a7ed74d96
commit
9eeecd2ada
@ -315,7 +315,11 @@ extern "C" void LLVMRustRemoveFunctionAttributes(LLVMValueRef Fn,
|
|||||||
// enable fpmath flag UnsafeAlgebra
|
// enable fpmath flag UnsafeAlgebra
|
||||||
extern "C" void LLVMRustSetHasUnsafeAlgebra(LLVMValueRef V) {
|
extern "C" void LLVMRustSetHasUnsafeAlgebra(LLVMValueRef V) {
|
||||||
if (auto I = dyn_cast<Instruction>(unwrap<Value>(V))) {
|
if (auto I = dyn_cast<Instruction>(unwrap<Value>(V))) {
|
||||||
|
#if LLVM_VERSION_GE(6, 0)
|
||||||
|
I->setFast(true);
|
||||||
|
#else
|
||||||
I->setHasUnsafeAlgebra(true);
|
I->setHasUnsafeAlgebra(true);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user