[OCaml] Synchronize transformations with LLVM-C.
[oota-llvm.git] / test / Bindings / Ocaml / vectorize_opts.ml
index 4e015a250c7517529578eba4ac98ab9a8932e01b..08f15d37a1b30fec96c80bfa2c3bd4d5526d7905 100644 (file)
@@ -1,7 +1,7 @@
 (* RUN: rm -rf %t.builddir
  * RUN: mkdir -p %t.builddir
  * RUN: cp %s %t.builddir
- * RUN: %ocamlopt -warn-error A llvm.cmxa llvm_vectorize.cmxa llvm_target.cmxa %t.builddir/vectorize_opts.ml -o %t
+ * RUN: %ocamlcomp -warn-error A llvm.%cma llvm_vectorize.%cma llvm_target.%cma %t.builddir/vectorize_opts.ml -o %t
  * RUN: %t %t.bc
  * XFAIL: vg_leak
  *)
@@ -35,16 +35,13 @@ let m = create_module context filename
 (*===-- Transforms --------------------------------------------------------===*)
 
 let test_transforms () =
-  let (++) x f = ignore (f x); x in
+  let (++) x f = f x; x in
 
   let fty = function_type void_type [| |] in
   let fn = define_function "fn" fty m in
   ignore (build_ret_void (builder_at_end context (entry_block fn)));
 
-  let td = DataLayout.create (target_triple m) in
-
   ignore (PassManager.create ()
-           ++ DataLayout.add td
            ++ add_bb_vectorize
            ++ add_loop_vectorize
            ++ add_slp_vectorize