1 # RUN: llc -mtriple=aarch64 -run-pass=machine-outliner -verify-machineinstrs %s -o - | FileCheck %s
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.
7 declare void @spam() local_unnamed_addr
8 define void @bax() optsize minsize noredzone { ret void }
9 define void @bay() optsize minsize noredzone { ret void }
10 define void @baz() optsize minsize noredzone { ret void }
14 tracksRegLiveness: true
19 $x1 = ADDXri $sp, 16, 0
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
28 tracksRegLiveness: true
33 $x1 = ADDXri $sp, 16, 0
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
42 tracksRegLiveness: true
47 $x1 = ADDXri $sp, 16, 0
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
55 # CHECK: BL @OUTLINED_FUNCTION_0, {{.*}}, implicit $x0{{.*}}