1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc %s -o - -mtriple=m68k -mcpu=M68000 | FileCheck %s --check-prefix=NO-ATOMIC
3 ; RUN: llc %s -o - -mtriple=m68k -mcpu=M68010 | FileCheck %s --check-prefix=NO-ATOMIC
4 ; RUN: llc %s -o - -mtriple=m68k -mcpu=M68020 | FileCheck %s --check-prefix=ATOMIC
5 ; RUN: llc %s -o - -mtriple=m68k -mcpu=M68030 | FileCheck %s --check-prefix=ATOMIC
6 ; RUN: llc %s -o - -mtriple=m68k -mcpu=M68040 | FileCheck %s --check-prefix=ATOMIC
8 define void @atomic_store_i8_element_monotonic(i8 %val, ptr %base, i32 %offset) nounwind {
9 ; NO-ATOMIC-LABEL: atomic_store_i8_element_monotonic:
11 ; NO-ATOMIC-NEXT: move.b (7,%sp), %d0
12 ; NO-ATOMIC-NEXT: move.l (12,%sp), %d1
13 ; NO-ATOMIC-NEXT: move.l (8,%sp), %a0
14 ; NO-ATOMIC-NEXT: move.b %d0, (0,%a0,%d1)
17 ; ATOMIC-LABEL: atomic_store_i8_element_monotonic:
19 ; ATOMIC-NEXT: move.b (7,%sp), %d0
20 ; ATOMIC-NEXT: move.l (12,%sp), %d1
21 ; ATOMIC-NEXT: move.l (8,%sp), %a0
22 ; ATOMIC-NEXT: move.b %d0, (0,%a0,%d1)
24 %store_pointer = getelementptr i8, ptr %base, i32 %offset
25 store atomic i8 %val, ptr %store_pointer monotonic, align 1
29 define i8 @atomic_load_i8_element_monotonic(ptr %base, i32 %offset) nounwind {
30 ; NO-ATOMIC-LABEL: atomic_load_i8_element_monotonic:
32 ; NO-ATOMIC-NEXT: move.l (8,%sp), %d0
33 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
34 ; NO-ATOMIC-NEXT: move.b (0,%a0,%d0), %d0
37 ; ATOMIC-LABEL: atomic_load_i8_element_monotonic:
39 ; ATOMIC-NEXT: move.l (8,%sp), %d0
40 ; ATOMIC-NEXT: move.l (4,%sp), %a0
41 ; ATOMIC-NEXT: move.b (0,%a0,%d0), %d0
43 %load_pointer = getelementptr i8, ptr %base, i32 %offset
44 %return_val = load atomic i8, ptr %load_pointer monotonic, align 1