1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=avr | FileCheck %s
4 define i8 @loadx(ptr %0) {
7 ; CHECK-NEXT: mov r26, r24
8 ; CHECK-NEXT: mov r27, r25
10 ; CHECK-NEXT: ld r24, X
13 %2 = tail call i8 asm sideeffect "ld $0, ${1:a}", "=r,x"(ptr %0)
17 define i8 @loady(ptr %0) {
20 ; CHECK-NEXT: push r28
21 ; CHECK-NEXT: push r29
22 ; CHECK-NEXT: mov r28, r24
23 ; CHECK-NEXT: mov r29, r25
25 ; CHECK-NEXT: ld r24, Y
30 %2 = tail call i8 asm sideeffect "ld $0, ${1:a}", "=r,y"(ptr %0)
34 define i8 @loadz(ptr %0) {
37 ; CHECK-NEXT: mov r30, r24
38 ; CHECK-NEXT: mov r31, r25
40 ; CHECK-NEXT: ld r24, Z
43 %2 = tail call i8 asm sideeffect "ld $0, ${1:a}", "=r,z"(ptr %0)
47 define i8 @load_ptr_imm() {
48 ; CHECK-LABEL: load_ptr_imm:
50 ; CHECK-NEXT: ldi r26, 210
51 ; CHECK-NEXT: ldi r27, 4
53 ; CHECK-NEXT: ld r24, X
56 %1 = tail call i8 asm sideeffect "ld $0, $1", "=r,e"(i16 1234)
60 define void @storex(ptr %0, i8 %1) {
61 ; CHECK-LABEL: storex:
63 ; CHECK-NEXT: mov r26, r24
64 ; CHECK-NEXT: mov r27, r25
66 ; CHECK-NEXT: st X, r22
69 tail call void asm sideeffect "st ${0:a}, $1", "x,r"(ptr %0, i8 %1)
73 define void @storey(ptr %0, i8 %1) {
74 ; CHECK-LABEL: storey:
76 ; CHECK-NEXT: push r28
77 ; CHECK-NEXT: push r29
78 ; CHECK-NEXT: mov r28, r24
79 ; CHECK-NEXT: mov r29, r25
81 ; CHECK-NEXT: st Y, r22
86 tail call void asm sideeffect "st ${0:a}, $1", "y,r"(ptr %0, i8 %1)
90 define void @storez(ptr %0, i8 %1) {
91 ; CHECK-LABEL: storez:
93 ; CHECK-NEXT: mov r30, r24
94 ; CHECK-NEXT: mov r31, r25
96 ; CHECK-NEXT: st Z, r22
99 tail call void asm sideeffect "st ${0:a}, $1", "z,r"(ptr %0, i8 %1)
103 define void @store_ptr_imm(i8 %0) {
104 ; CHECK-LABEL: store_ptr_imm:
106 ; CHECK-NEXT: ldi r26, 210
107 ; CHECK-NEXT: ldi r27, 4
109 ; CHECK-NEXT: st X, r24
110 ; CHECK-NEXT: ;NO_APP
112 tail call void asm sideeffect "st $0, $1", "e,r"(i16 1234, i8 %0)