Skip to content

Commit

Permalink
Remove some unnecessary (and ill-typed) checks in bitvector cast addi…
Browse files Browse the repository at this point in the history
…tion

These were benign (the Z3 errors were ignored), but undesirable.
  • Loading branch information
bacam committed Sep 1, 2023
1 parent 2145dd3 commit 658460e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/monomorphise.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4141,7 +4141,9 @@ module BitvectorSizeCasts = struct
| exception _ -> insts
)
in
let insts = KidSet.fold check_inst (tyvars_of_constraint nc) KBindings.empty in
let is_Int kid = match Env.get_typ_var kid env with K_int -> true | _ -> false in
let kids_to_check = KidSet.filter is_Int (tyvars_of_constraint nc) in
let insts = KidSet.fold check_inst kids_to_check KBindings.empty in
if KBindings.is_empty insts then h :: aux t
else begin
(* Propagate new instantiations and insert casts *)
Expand Down

0 comments on commit 658460e

Please sign in to comment.