Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let match_composite ty = match classify_type ty with
- TypeKind.Vector ->
- let size = vector_size (type_of llval) in
- let ptr = build_in_bounds_gep value_ptr (idx 3) "boxptr" builder in
- let vec_ptr = build_in_bounds_gep ptr [| const_int i32_type 0 |]
- "vecptr" builder in
- let new_vec = build_alloca (vector_type i64_type size) "vec" builder in
- let new_vec_ptr = build_in_bounds_gep new_vec (idx 0) "vecptr" builder in
- let rhvector_type size = pointer_type (vector_type i64_type size) in
- ignore (build_store new_vec_ptr vec_ptr builder);
- let el = build_load ptr "el" builder in
- build_bitcast el (rhvector_type size) "dst" builder
- let unbox_vec llval =
- let idx0 = [| const_int i32_type 0; const_int i32_type 3 |] in
- let ptr = build_in_bounds_gep llval idx0 "boxptr" builder in
- let el = build_load ptr "el" builder in
- let rhvector_type size = pointer_type (vector_type i64_type size) in
- let vec = build_bitcast el (rhvector_type 3) "vecptr" builder in
- build_load vec "load" builder
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement