Skip to content

Commit 560cea6

Browse files
authored
[NFC][AArch64] move AArch64 non auto-generated tests to static file (#126312)
Move AArch64 non auto-generated test code into a static file, since the script `./llvm/test/CodeGen/AArch64/Atomics/generate-tests.py` will overwrite these tests when re-run. (Test code was originally added in change 465bc5e)
1 parent 04e5ea5 commit 560cea6

File tree

2 files changed

+113
-112
lines changed

2 files changed

+113
-112
lines changed

llvm/test/CodeGen/AArch64/Atomics/aarch64-atomic-load-lse2.ll

-112
Original file line numberDiff line numberDiff line change
@@ -567,118 +567,6 @@ define dso_local i128 @load_atomic_i128_unaligned_seq_cst_const(ptr readonly %pt
567567
ret i128 %r
568568
}
569569

570-
define dso_local half @load_atomic_f16_aligned_unordered(ptr %ptr) {
571-
; CHECK-LABEL: load_atomic_f16_aligned_unordered:
572-
; CHECK: ldrh w8, [x0]
573-
%r = load atomic half, ptr %ptr unordered, align 2
574-
ret half %r
575-
}
576-
577-
define dso_local half @load_atomic_f16_aligned_unordered_const(ptr readonly %ptr) {
578-
; CHECK-LABEL: load_atomic_f16_aligned_unordered_const:
579-
; CHECK: ldrh w8, [x0]
580-
%r = load atomic half, ptr %ptr unordered, align 2
581-
ret half %r
582-
}
583-
584-
define dso_local half @load_atomic_f16_aligned_monotonic(ptr %ptr) {
585-
; CHECK-LABEL: load_atomic_f16_aligned_monotonic:
586-
; CHECK: ldrh w8, [x0]
587-
%r = load atomic half, ptr %ptr monotonic, align 2
588-
ret half %r
589-
}
590-
591-
define dso_local half @load_atomic_f16_aligned_monotonic_const(ptr readonly %ptr) {
592-
; CHECK-LABEL: load_atomic_f16_aligned_monotonic_const:
593-
; CHECK: ldrh w8, [x0]
594-
%r = load atomic half, ptr %ptr monotonic, align 2
595-
ret half %r
596-
}
597-
598-
define dso_local half @load_atomic_f16_aligned_acquire(ptr %ptr) {
599-
; CHECK-LABEL: load_atomic_f16_aligned_acquire:
600-
; CHECK: ldarh w8, [x0]
601-
%r = load atomic half, ptr %ptr acquire, align 2
602-
ret half %r
603-
}
604-
605-
define dso_local half @load_atomic_f16_aligned_acquire_const(ptr readonly %ptr) {
606-
; CHECK-LABEL: load_atomic_f16_aligned_acquire_const:
607-
; CHECK: ldarh w8, [x0]
608-
%r = load atomic half, ptr %ptr acquire, align 2
609-
ret half %r
610-
}
611-
612-
define dso_local half @load_atomic_f16_aligned_seq_cst(ptr %ptr) {
613-
; CHECK-LABEL: load_atomic_f16_aligned_seq_cst:
614-
; CHECK: ldarh w8, [x0]
615-
%r = load atomic half, ptr %ptr seq_cst, align 2
616-
ret half %r
617-
}
618-
619-
define dso_local half @load_atomic_f16_aligned_seq_cst_const(ptr readonly %ptr) {
620-
; CHECK-LABEL: load_atomic_f16_aligned_seq_cst_const:
621-
; CHECK: ldarh w8, [x0]
622-
%r = load atomic half, ptr %ptr seq_cst, align 2
623-
ret half %r
624-
}
625-
626-
define dso_local bfloat @load_atomic_bf16_aligned_unordered(ptr %ptr) {
627-
; CHECK-LABEL: load_atomic_bf16_aligned_unordered:
628-
; CHECK: ldrh w8, [x0]
629-
%r = load atomic bfloat, ptr %ptr unordered, align 2
630-
ret bfloat %r
631-
}
632-
633-
define dso_local bfloat @load_atomic_bf16_aligned_unordered_const(ptr readonly %ptr) {
634-
; CHECK-LABEL: load_atomic_bf16_aligned_unordered_const:
635-
; CHECK: ldrh w8, [x0]
636-
%r = load atomic bfloat, ptr %ptr unordered, align 2
637-
ret bfloat %r
638-
}
639-
640-
define dso_local bfloat @load_atomic_bf16_aligned_monotonic(ptr %ptr) {
641-
; CHECK-LABEL: load_atomic_bf16_aligned_monotonic:
642-
; CHECK: ldrh w8, [x0]
643-
%r = load atomic bfloat, ptr %ptr monotonic, align 2
644-
ret bfloat %r
645-
}
646-
647-
define dso_local bfloat @load_atomic_bf16_aligned_monotonic_const(ptr readonly %ptr) {
648-
; CHECK-LABEL: load_atomic_bf16_aligned_monotonic_const:
649-
; CHECK: ldrh w8, [x0]
650-
%r = load atomic bfloat, ptr %ptr monotonic, align 2
651-
ret bfloat %r
652-
}
653-
654-
define dso_local bfloat @load_atomic_bf16_aligned_acquire(ptr %ptr) {
655-
; CHECK-LABEL: load_atomic_bf16_aligned_acquire:
656-
; CHECK: ldarh w8, [x0]
657-
%r = load atomic bfloat, ptr %ptr acquire, align 2
658-
ret bfloat %r
659-
}
660-
661-
define dso_local bfloat @load_atomic_bf16_aligned_acquire_const(ptr readonly %ptr) {
662-
; CHECK-LABEL: load_atomic_bf16_aligned_acquire_const:
663-
; CHECK: ldarh w8, [x0]
664-
%r = load atomic bfloat, ptr %ptr acquire, align 2
665-
ret bfloat %r
666-
}
667-
668-
define dso_local bfloat @load_atomic_bf16_aligned_seq_cst(ptr %ptr) {
669-
; CHECK-LABEL: load_atomic_bf16_aligned_seq_cst:
670-
; CHECK: ldarh w8, [x0]
671-
%r = load atomic bfloat, ptr %ptr seq_cst, align 2
672-
ret bfloat %r
673-
}
674-
675-
define dso_local bfloat @load_atomic_bf16_aligned_seq_cst_const(ptr readonly %ptr) {
676-
; CHECK-LABEL: load_atomic_bf16_aligned_seq_cst_const:
677-
; CHECK: ldarh w8, [x0]
678-
%r = load atomic bfloat, ptr %ptr seq_cst, align 2
679-
ret bfloat %r
680-
}
681-
682570
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
683571
; -O0: {{.*}}
684572
; -O1: {{.*}}
+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+lse2 %s -o - | FileCheck %s
2+
3+
define dso_local half @load_atomic_f16_aligned_unordered(ptr %ptr) {
4+
; CHECK-LABEL: load_atomic_f16_aligned_unordered:
5+
; CHECK: ldrh w8, [x0]
6+
%r = load atomic half, ptr %ptr unordered, align 2
7+
ret half %r
8+
}
9+
10+
define dso_local half @load_atomic_f16_aligned_unordered_const(ptr readonly %ptr) {
11+
; CHECK-LABEL: load_atomic_f16_aligned_unordered_const:
12+
; CHECK: ldrh w8, [x0]
13+
%r = load atomic half, ptr %ptr unordered, align 2
14+
ret half %r
15+
}
16+
17+
define dso_local half @load_atomic_f16_aligned_monotonic(ptr %ptr) {
18+
; CHECK-LABEL: load_atomic_f16_aligned_monotonic:
19+
; CHECK: ldrh w8, [x0]
20+
%r = load atomic half, ptr %ptr monotonic, align 2
21+
ret half %r
22+
}
23+
24+
define dso_local half @load_atomic_f16_aligned_monotonic_const(ptr readonly %ptr) {
25+
; CHECK-LABEL: load_atomic_f16_aligned_monotonic_const:
26+
; CHECK: ldrh w8, [x0]
27+
%r = load atomic half, ptr %ptr monotonic, align 2
28+
ret half %r
29+
}
30+
31+
define dso_local half @load_atomic_f16_aligned_acquire(ptr %ptr) {
32+
; CHECK-LABEL: load_atomic_f16_aligned_acquire:
33+
; CHECK: ldarh w8, [x0]
34+
%r = load atomic half, ptr %ptr acquire, align 2
35+
ret half %r
36+
}
37+
38+
define dso_local half @load_atomic_f16_aligned_acquire_const(ptr readonly %ptr) {
39+
; CHECK-LABEL: load_atomic_f16_aligned_acquire_const:
40+
; CHECK: ldarh w8, [x0]
41+
%r = load atomic half, ptr %ptr acquire, align 2
42+
ret half %r
43+
}
44+
45+
define dso_local half @load_atomic_f16_aligned_seq_cst(ptr %ptr) {
46+
; CHECK-LABEL: load_atomic_f16_aligned_seq_cst:
47+
; CHECK: ldarh w8, [x0]
48+
%r = load atomic half, ptr %ptr seq_cst, align 2
49+
ret half %r
50+
}
51+
52+
define dso_local half @load_atomic_f16_aligned_seq_cst_const(ptr readonly %ptr) {
53+
; CHECK-LABEL: load_atomic_f16_aligned_seq_cst_const:
54+
; CHECK: ldarh w8, [x0]
55+
%r = load atomic half, ptr %ptr seq_cst, align 2
56+
ret half %r
57+
}
58+
59+
define dso_local bfloat @load_atomic_bf16_aligned_unordered(ptr %ptr) {
60+
; CHECK-LABEL: load_atomic_bf16_aligned_unordered:
61+
; CHECK: ldrh w8, [x0]
62+
%r = load atomic bfloat, ptr %ptr unordered, align 2
63+
ret bfloat %r
64+
}
65+
66+
define dso_local bfloat @load_atomic_bf16_aligned_unordered_const(ptr readonly %ptr) {
67+
; CHECK-LABEL: load_atomic_bf16_aligned_unordered_const:
68+
; CHECK: ldrh w8, [x0]
69+
%r = load atomic bfloat, ptr %ptr unordered, align 2
70+
ret bfloat %r
71+
}
72+
73+
define dso_local bfloat @load_atomic_bf16_aligned_monotonic(ptr %ptr) {
74+
; CHECK-LABEL: load_atomic_bf16_aligned_monotonic:
75+
; CHECK: ldrh w8, [x0]
76+
%r = load atomic bfloat, ptr %ptr monotonic, align 2
77+
ret bfloat %r
78+
}
79+
80+
define dso_local bfloat @load_atomic_bf16_aligned_monotonic_const(ptr readonly %ptr) {
81+
; CHECK-LABEL: load_atomic_bf16_aligned_monotonic_const:
82+
; CHECK: ldrh w8, [x0]
83+
%r = load atomic bfloat, ptr %ptr monotonic, align 2
84+
ret bfloat %r
85+
}
86+
87+
define dso_local bfloat @load_atomic_bf16_aligned_acquire(ptr %ptr) {
88+
; CHECK-LABEL: load_atomic_bf16_aligned_acquire:
89+
; CHECK: ldarh w8, [x0]
90+
%r = load atomic bfloat, ptr %ptr acquire, align 2
91+
ret bfloat %r
92+
}
93+
94+
define dso_local bfloat @load_atomic_bf16_aligned_acquire_const(ptr readonly %ptr) {
95+
; CHECK-LABEL: load_atomic_bf16_aligned_acquire_const:
96+
; CHECK: ldarh w8, [x0]
97+
%r = load atomic bfloat, ptr %ptr acquire, align 2
98+
ret bfloat %r
99+
}
100+
101+
define dso_local bfloat @load_atomic_bf16_aligned_seq_cst(ptr %ptr) {
102+
; CHECK-LABEL: load_atomic_bf16_aligned_seq_cst:
103+
; CHECK: ldarh w8, [x0]
104+
%r = load atomic bfloat, ptr %ptr seq_cst, align 2
105+
ret bfloat %r
106+
}
107+
108+
define dso_local bfloat @load_atomic_bf16_aligned_seq_cst_const(ptr readonly %ptr) {
109+
; CHECK-LABEL: load_atomic_bf16_aligned_seq_cst_const:
110+
; CHECK: ldarh w8, [x0]
111+
%r = load atomic bfloat, ptr %ptr seq_cst, align 2
112+
ret bfloat %r
113+
}

0 commit comments

Comments
 (0)