brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 3b8922f Raw
85 lines · plain
1# RUN: llc  -o -  -mtriple=thumbv7--windows-gnu -run-pass=greedy -run-pass=virtregrewriter %s | FileCheck %s2--- |3  target datalayout = "e-m:w-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"4  target triple = "thumbv7--windows-gnu"5  6  define void @subregLiveThrough() { ret void }7  define void @subregNotLiveThrough() { ret void }8  define void @subregNotLiveThrough2() { ret void }9 10...11---12# Check that we properly recognize that r1 is live through13# the first subreg copy.14# That will materialize as an implicit use of the big register15# on that copy.16# PR34107.17#18# CHECK-LABEL: name: subregLiveThrough19name:            subregLiveThrough20tracksRegLiveness: true21registers:22  - { id: 0, class: gprpair }23body:             |24  bb.0:25    liveins: $r0, $r126 27    ; That copy is being coalesced so we should use a KILL28    ; placeholder. If that's not a kill that means we probably29    ; not coalescing %0 and $r0_r1 and thus we are not testing30    ; the problematic code anymore.31    ;32    ; CHECK: $r0 = KILL $r0, implicit killed $r0_r1, implicit-def $r0_r133    ; CHECK-NEXT: $r1 = KILL $r1, implicit killed $r0_r134    undef %0.gsub_0 = COPY $r035    %0.gsub_1 = COPY $r136    tBX_RET 14, $noreg, implicit %037  38 39...40 41---42# Check that we properly recognize that r1 is *not* live through43# the first subreg copy.44# CHECK-LABEL: name: subregNotLiveThrough45name:            subregNotLiveThrough46tracksRegLiveness: true47registers:48  - { id: 0, class: gprpair }49body:             |50  bb.0:51    liveins: $r0, $r152 53    ; r1 is not live through so check we are not implicitly using54    ; the big register.55    ; CHECK: $r0 = KILL $r0, implicit-def $r0_r156    ; CHECK-NEXT: tBX_RET57    undef %0.gsub_0 = COPY $r058    tBX_RET 14, $noreg, implicit %059  60 61...62 63---64# Check that we properly recognize that r1 is *not* live through65# the first subreg copy. It is defined by this copy, but is not66# through.67# CHECK-LABEL: name: subregNotLiveThrough268name:            subregNotLiveThrough269tracksRegLiveness: true70registers:71  - { id: 0, class: gprpair }72body:             |73  bb.0:74    liveins: $r0, $r175 76    ; r1 is not live through so check we are not implicitly using77    ; the big register.78    ; CHECK: $r0 = KILL $r0, implicit-def $r1, implicit-def $r0_r179    ; CHECK-NEXT: tBX_RET80    undef %0.gsub_0 = COPY $r0, implicit-def $r181    tBX_RET 14, $noreg, implicit %082  83 84...85