Skip to content

Commit

Permalink
[OCaml] Fix tests after const_uitofp removal (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Nov 8, 2023
1 parent 2c61f9c commit 3dff285
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions llvm/test/Bindings/OCaml/core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,11 @@ let test_constants () =
* CHECK: @const_nuw_mul = global i64 mul nuw
* CHECK: @const_xor = global i64 xor
* CHECK: @const_icmp = global i1 icmp sle
* CHECK: @const_fcmp = global i1 fcmp ole
*)
let void_ptr = pointer_type context in
let five = const_int i64_type 5 in
let ffive = const_uitofp five double_type in
let foldbomb_gv = define_global "FoldBomb" (const_null i8_type) m in
let foldbomb = const_ptrtoint foldbomb_gv i64_type in
let ffoldbomb = const_uitofp foldbomb double_type in
ignore (define_global "const_neg" (const_neg foldbomb) m);
ignore (define_global "const_nsw_neg" (const_nsw_neg foldbomb) m);
ignore (define_global "const_nuw_neg" (const_nuw_neg foldbomb) m);
Expand All @@ -288,7 +285,6 @@ let test_constants () =
ignore (define_global "const_nuw_mul" (const_nuw_mul foldbomb five) m);
ignore (define_global "const_xor" (const_xor foldbomb five) m);
ignore (define_global "const_icmp" (const_icmp Icmp.Sle foldbomb five) m);
ignore (define_global "const_fcmp" (const_fcmp Fcmp.Ole ffoldbomb ffive) m);

group "constant casts";
(* CHECK: const_trunc{{.*}}trunc
Expand All @@ -305,7 +301,7 @@ let test_constants () =
i32_type) m);
ignore (define_global "const_inttoptr" (const_inttoptr (const_add foldbomb five)
void_ptr) m);
ignore (define_global "const_bitcast" (const_bitcast ffoldbomb i64_type) m);
ignore (define_global "const_bitcast" (const_bitcast foldbomb double_type) m);

group "misc constants";
(* CHECK: const_size_of{{.*}}getelementptr{{.*}}null
Expand Down

0 comments on commit 3dff285

Please sign in to comment.