def METHOD_NAME(A, B):
    ib = tvm.tir.ir_builder.create()
    Aptr = ib.buffer_ptr(A)
    Bptr = ib.buffer_ptr(B)
    tx = te.thread_axis("threadIdx.x")
    ib.scope_attr(tx, "thread_extent", 1)
    local = ib.allocate(A.dtype, (8,), name="buf_local", scope="local")
    shared = ib.allocate(A.dtype, (8,), name="buf_shared", scope="shared")
    with ib.for_range(0, 8) as i:
        with ib.if_scope(Aptr[i] < 0):
            local[i] = Aptr[i]
        with ib.else_scope():
            shared[i] = Aptr[i]
    with ib.for_range(0, 8) as i:
        with ib.if_scope(Aptr[i] < 0):
            Bptr[i] = local[i]
        with ib.else_scope():
            Bptr[i] = shared[i]
    return ib.get()