diff options
author | Martin Nowack <martin.nowack@gmail.com> | 2016-04-15 08:54:56 +0000 |
---|---|---|
committer | Martin Nowack <martin@se.inf.tu-dresden.de> | 2016-07-09 00:38:14 +0200 |
commit | 61bb349e953d76bf3fd96a6f853f273f81ed13ff (patch) | |
tree | de7ce7fcce647ec650630a071b5d570d54a1cedf /lib/Solver/STPBuilder.h | |
parent | e87e5bd478d8dad5a7c164197b9e39da3873442d (diff) | |
download | klee-61bb349e953d76bf3fd96a6f853f273f81ed13ff.tar.gz |
Fix variable shifting behavior with different sizes
Generated STP equality expressions have to be the same type. If a shift with different types as operands was used, therefore equality expressions of different width were generated. Beside avoiding the different sizes, this patch restores the original behavior to extract just the part involved in shifting and therefore should generate smaller expressions. Enable sdiv test case
Diffstat (limited to 'lib/Solver/STPBuilder.h')
-rw-r--r-- | lib/Solver/STPBuilder.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Solver/STPBuilder.h b/lib/Solver/STPBuilder.h index 3b17ccf1..5be34029 100644 --- a/lib/Solver/STPBuilder.h +++ b/lib/Solver/STPBuilder.h @@ -93,6 +93,8 @@ private: ExprHandle bvVarLeftShift(ExprHandle expr, ExprHandle shift); ExprHandle bvVarRightShift(ExprHandle expr, ExprHandle shift); ExprHandle bvVarArithRightShift(ExprHandle expr, ExprHandle shift); + ExprHandle extractPartialShiftValue(ExprHandle shift, unsigned width, + unsigned &shiftBits); ExprHandle constructAShrByConstant(ExprHandle expr, unsigned shift, ExprHandle isSigned); |