Remove use of the llvm.round intrinsic as it apparently doesn't work in some environments

This commit is contained in:
Magnus Norddahl 2016-11-13 08:57:29 +01:00
commit af7a7ab7d7
4 changed files with 18 additions and 7 deletions

View file

@ -112,12 +112,15 @@ SSAFloat SSAFloat::fma(SSAFloat a, SSAFloat b, SSAFloat c)
return SSAFloat::from_llvm(SSAScope::builder().CreateCall(SSAScope::intrinsic(llvm::Intrinsic::fma, params), args, SSAScope::hint()));
}
/* This intrinsic isn't always available..
SSAFloat SSAFloat::round(SSAFloat val)
{
std::vector<llvm::Type *> params;
params.push_back(SSAFloat::llvm_type());
return SSAFloat::from_llvm(SSAScope::builder().CreateCall(SSAScope::intrinsic(llvm::Intrinsic::round, params), val.v, SSAScope::hint()));
}
*/
SSAFloat SSAFloat::floor(SSAFloat val)
{