annotate test/CodeGen/ARM/virtregrewriter-subregliveness.mir @ 128:c347d3398279 default tip

fix
author mir3636
date Wed, 06 Dec 2017 14:37:17 +0900
parents 803732b1fca8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 # RUN: llc -o - -mtriple=thumbv7--windows-gnu -run-pass=greedy -run-pass=virtregrewriter %s | FileCheck %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2 --- |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 target datalayout = "e-m:w-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 target triple = "thumbv7--windows-gnu"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 define void @subregLiveThrough() { ret void }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 define void @subregNotLiveThrough() { ret void }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 define void @subregNotLiveThrough2() { ret void }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 # Check that we properly recognize that r1 is live through
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 # the first subreg copy.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 # That will materialize as an implicit use of the big register
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 # on that copy.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 # PR34107.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 #
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 # CHECK-LABEL: name: subregLiveThrough
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 name: subregLiveThrough
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21 registers:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 - { id: 0, class: gprpair }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 liveins: %r0, %r1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 ; That copy is being coalesced so we should use a KILL
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 ; placeholder. If that's not a kill that means we probably
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 ; not coalescing %0 and %r0_r1 and thus we are not testing
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30 ; the problematic code anymore.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31 ;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32 ; CHECK: %r0 = KILL %r0, implicit killed %r0_r1, implicit-def %r0_r1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33 ; CHECK-NEXT: %r1 = KILL %r1, implicit killed %r0_r1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34 undef %0.gsub_0 = COPY %r0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 %0.gsub_1 = COPY %r1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36 tBX_RET 14, _, implicit %0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
38
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
39 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
40
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
41 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42 # Check that we properly recognize that r1 is *not* live through
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
43 # the first subreg copy.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
44 # CHECK-LABEL: name: subregNotLiveThrough
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
45 name: subregNotLiveThrough
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
46 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
47 registers:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
48 - { id: 0, class: gprpair }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
49 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
50 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
51 liveins: %r0, %r1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
52
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
53 ; r1 is not live through so check we are not implicitly using
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
54 ; the big register.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
55 ; CHECK: %r0 = KILL %r0, implicit-def %r0_r1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
56 ; CHECK-NEXT: tBX_RET
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
57 undef %0.gsub_0 = COPY %r0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
58 tBX_RET 14, _, implicit %0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
59
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
60
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
61 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
62
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
63 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
64 # Check that we properly recognize that r1 is *not* live through
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
65 # the first subreg copy. It is defined by this copy, but is not
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
66 # through.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
67 # CHECK-LABEL: name: subregNotLiveThrough2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
68 name: subregNotLiveThrough2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
69 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
70 registers:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
71 - { id: 0, class: gprpair }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
72 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
73 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
74 liveins: %r0, %r1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
75
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
76 ; r1 is not live through so check we are not implicitly using
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
77 ; the big register.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
78 ; CHECK: %r0 = KILL %r0, implicit-def %r1, implicit-def %r0_r1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
79 ; CHECK-NEXT: tBX_RET
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
80 undef %0.gsub_0 = COPY %r0, implicit-def %r1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
81 tBX_RET 14, _, implicit %0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
82
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
83
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
84 ...