diff options
author | Daniel Dunbar <daniel@zuster.org> | 2014-09-13 19:01:17 -0700 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2014-09-13 19:01:17 -0700 |
commit | 7c79c1c5299108e58852905182abcc7d3ba6fa40 (patch) | |
tree | 1ed4b5bf7e8622465161e266708af466c144c107 | |
parent | 3369faf382a6a18e29ef871fdd9bd9da5445af8c (diff) | |
download | klee-7c79c1c5299108e58852905182abcc7d3ba6fa40.tar.gz |
[Core] Fix implementation of FRem for LLVM 3.3+, which was wrong (caught by FloatingPointOps.ll).
-rw-r--r-- | lib/Core/Executor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 152b8c44..d2978642 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -2138,7 +2138,8 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) { return terminateStateOnExecError(state, "Unsupported FRem operation"); #if LLVM_VERSION_CODE >= LLVM_VERSION(3, 3) llvm::APFloat Res(*fpWidthToSemantics(left->getWidth()), left->getAPValue()); - Res.remainder(APFloat(*fpWidthToSemantics(right->getWidth()),right->getAPValue())); + Res.mod(APFloat(*fpWidthToSemantics(right->getWidth()),right->getAPValue()), + APFloat::rmNearestTiesToEven); #else llvm::APFloat Res(left->getAPValue()); Res.mod(APFloat(right->getAPValue()), APFloat::rmNearestTiesToEven); |