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 'LDDWRdPtrQ' pseudo instruction.
7 target triple = "avr--"
8 define void @test_lddwrdptrq() {
16 tracksRegLiveness: true
21 ; CHECK-LABEL: test_lddwrdptrq
23 ; CHECK: $r24 = LDDRdPtrQ $r31r30, 10
24 ; CHECK-NEXT: $r25 = LDDRdPtrQ $r31r30, 11
26 ; CHECK-TINY: $r30 = SUBIRdK $r30, 246, implicit-def $sreg
27 ; CHECK-TINY-NEXT: $r31 = SBCIRdK $r31, 255, implicit-def $sreg, implicit killed $sreg
28 ; CHECK-TINY-NEXT: $r24, $r31r30 = LDRdPtrPi killed $r31r30
29 ; CHECK-TINY-NEXT: $r25, $r31r30 = LDRdPtrPi killed $r31r30
30 ; CHECK-TINY-NEXT: $r30 = SUBIRdK $r30, 12, implicit-def $sreg
31 ; CHECK-TINY-NEXT: $r31 = SBCIRdK $r31, 0, implicit-def $sreg, implicit killed $sreg
33 early-clobber $r25r24 = LDDWRdPtrQ undef $r31r30, 10