Skip to content

Commit 2a55432

Browse files
arsenmfschlimb
authored andcommitted
AArch64: Add arm64ec libcall tests for __arm_sc_* functions (llvm#144356)
1 parent a5e03d4 commit 2a55432

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

llvm/test/CodeGen/AArch64/arm64ec-builtins.ll

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,33 @@ define float @f6(float %val, i32 %a) {
4242
%call = tail call fast float @llvm.ldexp.f32(float %val, i32 %a)
4343
ret float %call
4444
}
45+
46+
@dst = global [512 x i8] zeroinitializer, align 1
47+
@src = global [512 x i8] zeroinitializer, align 1
48+
49+
; FIXME: Wrong and probably needs a # prefix
50+
define void @call__arm_sc_memcpy(i64 noundef %n) #0 {
51+
; CHECK-LABEL: "#call__arm_sc_memcpy":
52+
; CHECK: bl __arm_sc_memcpy
53+
54+
tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 @dst, ptr nonnull align 1 @src, i64 %n, i1 false)
55+
ret void
56+
}
57+
58+
; FIXME: Wrong and probably needs a # prefix
59+
define void @call__arm_sc_memmove(i64 noundef %n) #0 {
60+
; CHECK-LABEL: "#call__arm_sc_memmove":
61+
; CHECK: bl __arm_sc_memmove
62+
tail call void @llvm.memmove.p0.p0.i64(ptr align 1 @dst, ptr nonnull align 1 @src, i64 %n, i1 false)
63+
ret void
64+
}
65+
66+
; FIXME: Wrong and probably needs a # prefix
67+
define void @call__arm_sc_memset(i64 noundef %n) #0 {
68+
; CHECK-LABEL: "#call__arm_sc_memset":
69+
; CHECK: bl __arm_sc_memset
70+
tail call void @llvm.memset.p0.i64(ptr align 1 @dst, i8 2, i64 %n, i1 false)
71+
ret void
72+
}
73+
74+
attributes #0 = { nounwind "aarch64_pstate_sm_enabled" "target-features"="+sme2" }

0 commit comments

Comments
 (0)