mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Allow speculating llvm.sqrt, fma and fmuladd
This doesn't set errno, so this should be OK. Also update the documentation to explicitly state that errno are not set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200501 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2036,6 +2036,12 @@ bool llvm::isSafeToSpeculativelyExecute(const Value *V,
|
||||
case Intrinsic::umul_with_overflow:
|
||||
case Intrinsic::usub_with_overflow:
|
||||
return true;
|
||||
// Sqrt should be OK, since the llvm sqrt intrinsic isn't defined to set
|
||||
// errno like libm sqrt would.
|
||||
case Intrinsic::sqrt:
|
||||
case Intrinsic::fma:
|
||||
case Intrinsic::fmuladd:
|
||||
return true;
|
||||
// TODO: some fp intrinsics are marked as having the same error handling
|
||||
// as libm. They're safe to speculate when they won't error.
|
||||
// TODO: are convert_{from,to}_fp16 safe?
|
||||
|
||||
Reference in New Issue
Block a user