1 # Check that modifying X5 register is not a problem for machine outliner
3 # RUN: llc -mtriple=riscv32 -x mir -run-pass=machine-outliner -simplify-mir -verify-machineinstrs < %s \
4 # RUN: | FileCheck -check-prefixes=CHECK,RV32I-MO %s
5 # RUN: llc -mtriple=riscv64 -x mir -run-pass=machine-outliner -simplify-mir -verify-machineinstrs < %s \
6 # RUN: | FileCheck -check-prefixes=CHECK,RV64I-MO %s
9 define i32 @outline_tail_1(i32 %a, i32 %b) { ret i32 0 }
11 define i32 @outline_tail_2(i32 %a, i32 %b) { ret i32 0 }
15 tracksRegLiveness: true
19 liveins: $x10, $x11, $x5
20 ; RV32I-MO-LABEL: name: outline_tail_1
21 ; RV32I-MO: PseudoTAIL target-flags(riscv-call) @OUTLINED_FUNCTION_0, implicit $x2, implicit-def $x10, implicit-def $x11, implicit-def $x12, implicit $x2, implicit $x5, implicit $x10, implicit $x11
23 ; RV64I-MO-LABEL: name: outline_tail_1
24 ; RV64I-MO: PseudoTAIL target-flags(riscv-call) @OUTLINED_FUNCTION_0, implicit $x2, implicit-def $x10, implicit-def $x11, implicit-def $x12, implicit $x2, implicit $x5, implicit $x10, implicit $x11
30 PseudoRET implicit $x10
34 tracksRegLiveness: true
38 liveins: $x10, $x11, $x5
39 ; RV32I-MO-LABEL: name: outline_tail_2
40 ; RV32I-MO: PseudoTAIL target-flags(riscv-call) @OUTLINED_FUNCTION_0, implicit $x2, implicit-def $x10, implicit-def $x11, implicit-def $x12, implicit $x2, implicit $x5, implicit $x10, implicit $x11
42 ; RV64I-MO-LABEL: name: outline_tail_2
43 ; RV64I-MO: PseudoTAIL target-flags(riscv-call) @OUTLINED_FUNCTION_0, implicit $x2, implicit-def $x10, implicit-def $x11, implicit-def $x12, implicit $x2, implicit $x5, implicit $x10, implicit $x11
49 PseudoRET implicit $x10
53 # CHECK-LABEL: name: OUTLINED_FUNCTION_0
54 # CHECK: isOutlined: true