diff options
Diffstat (limited to 'lib/Solver')
-rw-r--r-- | lib/Solver/STPBuilder.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Solver/STPBuilder.cpp b/lib/Solver/STPBuilder.cpp index 6cb7dd38..cdc30f85 100644 --- a/lib/Solver/STPBuilder.cpp +++ b/lib/Solver/STPBuilder.cpp @@ -223,8 +223,10 @@ ExprHandle STPBuilder::bvVarLeftShift(ExprHandle expr, ExprHandle amount, unsign bvLeftShift(expr, i, shiftBits), res); } + + // If overshifting, shift to zero res = vc_iteExpr(vc, - vc_bvLtExpr(vc, amount, bvConst32(32, width)), + vc_bvLtExpr(vc, amount, bvConst32(width, width)), res, bvZero(width)); return res; |