Skip to content

Commit

Permalink
fix #383
Browse files Browse the repository at this point in the history
  • Loading branch information
Lerr1uqs committed Dec 26, 2023
1 parent aec691c commit 4823134
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion claripy/simplifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,8 +728,11 @@ def bitwise_and_simplifier(a, b, *args):
# yes!
return ast.all_operations.ZeroExt(a.args[0].size(), a.args[1])

# lengths come from a.args[1].length + a.args[2].length + b.args[1].length + b.args[2].length
lengths = [e.length for pair in zip(a.args[1:3], b.args[1:3]) for e in pair]

# if(cond0, 1, 0) & if(cond1, 1, 0) -> if(cond0 & cond1, 1, 0)
if a.op == "If" and b.op == "If":
if a.op == "If" and b.op == "If" and all(l == 1 for l in lengths):
if (
(a.args[1] == ast.all_operations.BVV(1, 1)).is_true()
and (a.args[2] == ast.all_operations.BVV(0, 1)).is_true()
Expand Down

0 comments on commit 4823134

Please sign in to comment.