// #target: macos-x64
module test;

fn void main()
{
    ushort src = 1;
    ushort dst = 2;

    $$memcpy(&dst, &src, ushort.sizeof, false, $alignof(dst), $alignof(src));
    $$memmove(&dst, &src, ushort.sizeof, false, $alignof(dst), $alignof(src));
    $$memset(&dst, (char)0, ushort.sizeof, false, $alignof(dst));

    $$memcpy_inline(&dst, &src, ushort.sizeof, false, $alignof(dst), $alignof(src));
    $$memset_inline(&dst, (char)0, ushort.sizeof, false, $alignof(dst));
}

/* #expect: test.ll

  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %dst, ptr align 2 %src, i64 2, i1 false)
  call void @llvm.memmove.p0.p0.i64(ptr align 2 %dst, ptr align 2 %src, i64 2, i1 false)
  call void @llvm.memset.p0.i64(ptr align 2 %dst, i8 0, i64 2, i1 false)
  call void @llvm.memcpy.inline.p0.p0.i64(ptr align 2 %dst, ptr align 2 %src, i64 2, i1 false)
  call void @llvm.memset.inline.p0.i64(ptr align 2 %dst, i8 0, i64 2, i1 false)
