Skip to content

Commit

Permalink
Translate shl overshifts into 0
Browse files Browse the repository at this point in the history
The other shift operators still need to be changed
  • Loading branch information
Paul Marinescu authored and Dan Liew committed Feb 14, 2014
1 parent d2f1684 commit 3160935
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Solver/STPBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ ExprHandle STPBuilder::bvVarLeftShift(ExprHandle expr, ExprHandle amount, unsign
bvLeftShift(expr, i, shiftBits),
res);
}
res = vc_iteExpr(vc,
vc_bvLtExpr(vc, amount, bvConst32(32, width)),
res,
bvZero(width));
return res;
}

Expand Down

0 comments on commit 3160935

Please sign in to comment.