1 # RUN: llc -O0 -run-pass=avr-expand-pseudo %s -o - | FileCheck %s
2 # RUN: llc -O0 -run-pass=avr-expand-pseudo -mattr=avrtiny %s -o - \
3 # RUN: | FileCheck %s --check-prefix=CHECK-TINY
4 # RUN: llc -O0 -run-pass=avr-expand-pseudo -mattr=lowbytefirst %s -o - \
5 # RUN: | FileCheck %s --check-prefix=CHECK-XMEGA
7 # This test checks the expansion of the 16-bit STSWRdK pseudo instruction.
10 target triple = "avr--"
11 define void @test_stwptrrr() {
21 liveins: $r31r30, $r17r16
23 ; CHECK-LABEL: test_stwptrrr
24 ; CHECK: STDPtrQRr $r31r30, 1, $r17
25 ; CHECK-NEXT: STPtrRr $r31r30, $r16
27 ; CHECK-TINY-LABEL: test_stwptrrr
28 ; CHECK-TINY: $r31r30 = STPtrPiRr killed $r31r30, $r16, 0
29 ; CHECK-TINY-NEXT: $r31r30 = STPtrPiRr killed $r31r30, $r17, 0
30 ; CHECK-TINY-NEXT: $r30 = SUBIRdK killed $r30, 2, implicit-def $sreg
31 ; CHECK-TINY-NEXT: $r31 = SBCIRdK killed $r31, 0, implicit-def $sreg, implicit killed $sreg
33 ; CHECK-XMEGA-LABEL: test_stwptrrr
34 ; CHECK-XMEGA: STPtrRr $r31r30, $r16
35 ; CHECK-XMEGA-NEXT: STDPtrQRr $r31r30, 1, $r17
37 STWPtrRr $r31r30, $r17r16