xref: /llvm-project/llvm/test/CodeGen/SystemZ/tail-call-mem-intrinsics.ll (revision a1710eb3cd5823c5d14899112ca3086acbdbe9cb)
1; RUN: llc -mtriple=s390x-linux-gnu < %s | FileCheck %s
2
3; CHECK-LABEL: tail_memmove:
4; CHECK: jg memmove
5define void @tail_memmove(ptr nocapture %p, ptr nocapture readonly %q, i32 %n) #0 {
6entry:
7  tail call void @llvm.memmove.p0.p0.i32(ptr %p, ptr %q, i32 %n, i1 false)
8  ret void
9}
10
11; CHECK-LABEL: tail_memset:
12; CHECK: jg memset
13define void @tail_memset(ptr nocapture %p, i8 %c, i32 %n) #0 {
14entry:
15  tail call void @llvm.memset.p0.i32(ptr %p, i8 %c, i32 %n, i1 true)
16  ret void
17}
18
19declare void @llvm.memcpy.p0.p0.i32(ptr nocapture, ptr nocapture readonly, i32, i1) #0
20declare void @llvm.memmove.p0.p0.i32(ptr nocapture, ptr nocapture readonly, i32, i1) #0
21declare void @llvm.memset.p0.i32(ptr nocapture, i8, i32, i1) #0
22
23attributes #0 = { nounwind }
24