brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1010 B · 6eaa943 Raw
41 lines · plain
1# RUN: llc -mtriple=avr -mattr=+lpm -mattr=+lpmx -start-before=greedy %s -o - \2# RUN:     | FileCheck %s3# RUN: llc -mtriple=avr -mattr=+lpm -mattr=-lpmx -start-before=greedy %s -o - \4# RUN:     | FileCheck --check-prefix=NOX %s5 6# This test checks the expansion of the 8-bit LPMBRdZ 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_lpmbrdz() {13  entry:14    ret void15  }16...17 18---19name:            test_lpmbrdz20tracksRegLiveness: true21body: |22  bb.0.entry:23    liveins: $r31r3024 25    ; CHECK-LABEL: test_lpmbrdz:26    ; CHECK:       ; %bb.0:27    ; CHECK-NEXT:    lpm r30, Z28    ; CHECK-NEXT:    ret29 30    ; NOX-LABEL:   test_lpmbrdz31    ; NOX:         ; %bb.0:32    ; NOX-NEXT:      lpm33    ; NOX-NEXT:      mov r30, r034    ; NOX-NEXT:      ret35 36    %1:zreg = COPY killed $r31r3037    %2:gpr8 = LPMBRdZ %1, implicit-def dead $r038    $r30 = COPY %239    RET implicit $r3040...41