1 # RUN: llc -mtriple=avr -mattr=+lpm -mattr=+lpmx -start-before=greedy %s -o - \
3 # RUN: llc -mtriple=avr -mattr=+lpm -mattr=-lpmx -start-before=greedy %s -o - \
4 # RUN: | FileCheck --check-prefix=NOX %s
6 # This test checks the expansion of the 8-bit LPMBRdZ pseudo instruction and that
7 # the register allocator won't use R31R30 as an output register (which would
8 # lead to undefined behavior).
11 target triple = "avr--"
12 define void @test_lpmbrdz() {
20 tracksRegLiveness: true
25 ; CHECK-LABEL: test_lpmbrdz:
27 ; CHECK-NEXT: lpm r30, Z
30 ; NOX-LABEL: test_lpmbrdz
33 ; NOX-NEXT: mov r30, r0
36 %1:zreg = COPY killed $r31r30
37 %2:gpr8 = LPMBRdZ %1, implicit-def dead $r0