From 7ff20e3da8b6d3384157d24282d510eb8e4d2f10 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Fri, 15 Jun 2018 07:51:10 +0200 Subject: llvm38: no rounding in APFloat The rounding was removed because it was never needed: llvm-mirror/llvm@ff278be Signed-off-by: Jiri Slaby --- lib/Core/Executor.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Core') diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 3d7eb21d..b053d488 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -2242,8 +2242,13 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) { !fpWidthToSemantics(right->getWidth())) return terminateStateOnExecError(state, "Unsupported FRem operation"); llvm::APFloat Res(*fpWidthToSemantics(left->getWidth()), left->getAPValue()); +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8) + Res.mod( + APFloat(*fpWidthToSemantics(right->getWidth()), right->getAPValue())); +#else Res.mod(APFloat(*fpWidthToSemantics(right->getWidth()),right->getAPValue()), APFloat::rmNearestTiesToEven); +#endif bindLocal(ki, state, ConstantExpr::alloc(Res.bitcastToAPInt())); break; } -- cgit 1.4.1