Don't set fast
(-math) for certain simd ops
`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. Since the time when these intrinsics have been implemented the intrinsics user's (stdsimd) approach has changed significantly and so now it is required that these intrinsics operate normally rather than in "whatever" way. Fixes #84268
This commit is contained in:
parent
cd9b30527e
commit
487e27350a
19 changed files with 154 additions and 131 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue