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 - | FileCheck %s --check-prefix=CHECK-TINY
4 # This test checks the expansion of the 16-bit LDWRdPtr pseudo instruction.
7 target triple = "avr--"
8 define void @test_ldwrdptr() {
20 ; CHECK-LABEL: test_ldwrdptr
22 ; CHECK: $r0 = LDRdPtr $r31r30
23 ; CHECK-NEXT: $r1 = LDDRdPtrQ $r31r30, 1
25 ; CHECK-TINY: $r0, $r31r30 = LDRdPtrPi killed $r31r30
26 ; CHECK-TINY-NEXT: $r1, $r31r30 = LDRdPtrPi killed $r31r30
27 ; CHECK-TINY-NEXT: $r30 = SUBIRdK $r30, 2, implicit-def $sreg
28 ; CHECK-TINY-NEXT: $r31 = SBCIRdK $r31, 0, implicit-def $sreg, implicit killed $sreg
30 $r1r0 = LDWRdPtr $r31r30