File: machine-outliner-unsafe-range-at-end.mir

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (54 lines) | stat: -rw-r--r-- 1,843 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc %s -mtriple aarch64 -run-pass=machine-outliner -o - | FileCheck %s

...
---
name:           unsafe_range_at_end
tracksRegLiveness: true
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $x0, $x9
    ; Begin safe range of 3 instructions

    ; Outline
    ; CHECK-LABEL: name: unsafe_range_at_end
    ; CHECK: liveins: $x0, $x9
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: BL @OUTLINED_FUNCTION_0, implicit-def $lr, implicit $sp, implicit-def $lr, implicit-def $x0, implicit-def $x1, implicit-def $x2, implicit-def $x3, implicit $x0, implicit $sp
    ; CHECK-NEXT: $x8 = ADDXri $x3, 3, 0
    ; CHECK-NEXT: BL @OUTLINED_FUNCTION_0, implicit-def $lr, implicit $sp, implicit-def $lr, implicit-def $x0, implicit-def $x1, implicit-def $x2, implicit-def $x3, implicit $x0, implicit $sp
    ; CHECK-NEXT: $x16 = ADDXri $x0, 16, 0
    ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
    ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
    ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
    ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
    ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
    ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
    ; CHECK-NEXT: $x16 = ADDXri killed $x16, 16, 0
    ; CHECK-NEXT: RET undef $x9
    $x0 = ADDXri $x0, 0, 0
    $x1 = ADDXri $x0, 1, 0
    $x2 = ADDXri $x0, 2, 0
    $x3 = ADDXri $x0, 3, 0

    ; Split here
    $x8 = ADDXri $x3, 3, 0

    ; Outline
    $x0 = ADDXri $x0, 0, 0
    $x1 = ADDXri $x0, 1, 0
    $x2 = ADDXri $x0, 2, 0
    $x3 = ADDXri $x0, 3, 0

    ; Don't outline any of this
    $x16 = ADDXri $x0, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x16 = ADDXri killed $x16, 16, 0
    RET undef $x9