1
1
# RUN: llc -mtriple=aarch64 -run-pass=machine-outliner -verify-machineinstrs %s -o - | FileCheck %s
2
2
3
- # The test checks whether the compiler updates the side effect of function @OUTLINED_FUNCTION_0 by adding the use of register x0.
3
+ # The test checks whether the compiler updates the side effect of function @OUTLINED_FUNCTION_0
4
+ # when implict-def and implict use of $x0 in the same instruction.
4
5
5
6
--- |
6
7
declare void @spam() local_unnamed_addr
@@ -16,7 +17,8 @@ body: |
16
17
liveins: $x0, $lr
17
18
18
19
$x1 = ADDXri $sp, 16, 0
19
- BL @spam, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit killed $x1, implicit-def $sp, implicit-def dead $x0
20
+ BL @spam, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit killed $x1, implicit-def $sp, implicit-def $x0
21
+ renamable $x1 = COPY $x0
20
22
21
23
RET_ReallyLR
22
24
@@ -29,7 +31,8 @@ body: |
29
31
liveins: $x0, $lr
30
32
31
33
$x1 = ADDXri $sp, 16, 0
32
- BL @spam, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit killed $x1, implicit-def $sp, implicit-def dead $x0
34
+ BL @spam, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit killed $x1, implicit-def $sp, implicit-def $x0
35
+ renamable $x2 = COPY $x0
33
36
34
37
RET_ReallyLR
35
38
@@ -42,10 +45,11 @@ body: |
42
45
liveins: $x0, $lr
43
46
44
47
$x1 = ADDXri $sp, 16, 0
45
- BL @spam, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit killed $x1, implicit-def $sp, implicit-def dead $x0
48
+ BL @spam, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit killed $x1, implicit-def $sp, implicit-def $x0
49
+ renamable $x3 = COPY $x0
46
50
47
51
RET_ReallyLR
48
52
49
53
...
50
54
51
- # CHECK: BL @OUTLINED_FUNCTION_0, {{.*}}, implicit $x0
55
+ # CHECK: BL @OUTLINED_FUNCTION_0, {{.*}}, implicit $x0{{.*}}
0 commit comments