Skip to content

Commit

Permalink
remove special cases handled by general case
Browse files Browse the repository at this point in the history
  • Loading branch information
stilscher committed Nov 20, 2023
1 parent 0cb1b7e commit 19190ca
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/analyses/base.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2339,13 +2339,9 @@ struct
| None, _ -> ID.top_of ik
| Some mx, Some mm when Z.equal mx mm -> ID.top_of ik
| _, _ ->
match ID.le xcast (ID.of_int ik Z.zero) with
| d when d = ID.of_int ik Z.zero -> xcast (* x positive *)
| d when d = ID.of_int ik Z.one -> ID.neg xcast (* x negative *)
| _ -> (* both possible *)
let x1 = ID.neg (ID.meet (ID.ending ik Z.zero) xcast) in
let x2 = ID.meet (ID.starting ik Z.zero) xcast in
ID.join x1 x2
let x1 = ID.neg (ID.meet (ID.ending ik Z.zero) xcast) in
let x2 = ID.meet (ID.starting ik Z.zero) xcast in
ID.join x1 x2
)
| _ -> failwith ("non-integer argument in call to function "^f.vname)
end
Expand Down

0 comments on commit 19190ca

Please sign in to comment.