1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[Test] Fix freeze ocaml test failure

This commit is contained in:
Juneyoung Lee 2019-11-22 21:45:55 +09:00
parent 6e5fd6e850
commit d55a60579e
4 changed files with 15 additions and 0 deletions

View File

@ -1355,6 +1355,8 @@ external build_is_not_null : llvalue -> string -> llbuilder -> llvalue
= "llvm_build_is_not_null"
external build_ptrdiff : llvalue -> llvalue -> string -> llbuilder -> llvalue
= "llvm_build_ptrdiff"
external build_freeze : llvalue -> string -> llbuilder -> llvalue
= "llvm_build_freeze"
(*===-- Memory buffers ----------------------------------------------------===*)

View File

@ -2591,6 +2591,12 @@ val build_is_not_null : llvalue -> string -> llbuilder -> llvalue
See the method [llvm::LLVMBuilder::CreatePtrDiff]. *)
val build_ptrdiff : llvalue -> llvalue -> string -> llbuilder -> llvalue
(** [build_freeze x name b] creates a
[%name = freeze %x]
instruction at the position specified by the instruction builder [b].
See the method [llvm::LLVMBuilder::CreateFreeze]. *)
val build_freeze : llvalue -> string -> llbuilder -> llvalue
(** {6 Memory buffers} *)

View File

@ -2451,6 +2451,12 @@ CAMLprim LLVMValueRef llvm_build_ptrdiff(LLVMValueRef LHS, LLVMValueRef RHS,
return LLVMBuildPtrDiff(Builder_val(B), LHS, RHS, String_val(Name));
}
/* llvalue -> string -> llbuilder -> llvalue */
CAMLprim LLVMValueRef llvm_build_freeze(LLVMValueRef X,
value Name, value B) {
return LLVMBuildFreeze(Builder_val(B), X, String_val(Name));
}
/*===-- Memory buffers ----------------------------------------------------===*/
/* string -> llmemorybuffer

View File

@ -1370,6 +1370,7 @@ let test_builder () =
* CHECK: %build_nuw_neg = sub nuw i32 0, %P1
* CHECK: %build_fneg = fneg float %F1
* CHECK: %build_not = xor i32 %P1, -1
* CHECK: %build_freeze = freeze i32 %P1
*)
ignore (build_add p1 p2 "build_add" b);
ignore (build_nsw_add p1 p2 "build_nsw_add" b);