brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 29dbd79 Raw
46 lines · plain
1# RUN: llc -mtriple=avr -mattr=+elpm -mattr=+elpmx -start-before=greedy %s -o - \2# RUN:     | FileCheck %s3# RUN: llc -mtriple=avr -mattr=+elpm -mattr=-elpmx -start-before=greedy %s -o - \4# RUN:     | FileCheck --check-prefix=NOX %s5 6# This test checks the expansion of the 16-bit ELPM pseudo instruction and that7# the register allocator won't use R31R30 as an output register (which would8# lead to undefined behavior).9 10--- |11  target triple = "avr--"12  define void @test_elpmbrdz() {13  entry:14    ret void15  }16...17 18---19name:            test_elpmbrdz20tracksRegLiveness: true21body: |22  bb.0.entry:23    liveins: $r31r3024 25    ; CHECK-LABEL: test_elpmbrdz26    ; CHECK:       ; %bb.0:27    ; CHECK-NEXT:    ldi r24, 128    ; CHECK-NEXT:    out29    ; CHECK-NEXT:    elpm r31, Z30    ; CHECK-NEXT:    ret31 32    ; NOX-LABEL:   test_elpmbrdz33    ; NOX:         ; %bb.0:34    ; NOX-NEXT:      ldi r24, 135    ; NOX-NEXT:      out36    ; NOX-NEXT:      elpm37    ; NOX-NEXT:      mov r31, r038    ; NOX-NEXT:      ret39 40    %1:zreg = COPY killed $r31r3041    %2:ld8 = LDIRdK 142    %3:gpr8 = ELPMBRdZ %1, %2, implicit-def dead $r043    $r31 = COPY %344    RET implicit $r3145...46