File: outlining-basic-branches.ll

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 (50 lines) | stat: -rw-r--r-- 1,360 bytes parent folder | download | duplicates (14)
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
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --include-generated-funcs
; RUN: opt -S -passes=verify,iroutliner -ir-outlining-no-cost < %s | FileCheck %s

; This checks that we are able to outline exactly the same structure without
; any other items to outline.

define void @outline_outputs1() #0 {
entry:
  br label %next
next:
  br label %next2
next2:
  br label %next3
next3:
  %a = alloca i32, align 4
  br label %next4
next4:
  br label %next5
next5:
  br label %next6
next6:
  %b = alloca i32, align 4
  ret void
}

; CHECK-LABEL: @outline_outputs1(
; CHECK-NEXT:  entry:
; CHECK-NEXT:    call void @outlined_ir_func_0()
; CHECK-NEXT:    br label [[NEXT3:%.*]]
; CHECK:       next3:
; CHECK-NEXT:    [[A:%.*]] = alloca i32, align 4
; CHECK-NEXT:    call void @outlined_ir_func_0()
; CHECK-NEXT:    br label [[NEXT6:%.*]]
; CHECK:       next6:
; CHECK-NEXT:    [[B:%.*]] = alloca i32, align 4
; CHECK-NEXT:    ret void
;
;
; CHECK: define internal void @outlined_ir_func_0(
; CHECK-NEXT:  newFuncRoot:
; CHECK-NEXT:    br label [[ENTRY_TO_OUTLINE:%.*]]
; CHECK:       entry_to_outline:
; CHECK-NEXT:    br label [[NEXT:%.*]]
; CHECK:       next:
; CHECK-NEXT:    br label [[NEXT2:%.*]]
; CHECK:       next2:
; CHECK-NEXT:    br label [[NEXT3_EXITSTUB:%.*]]
; CHECK:       next3.exitStub:
; CHECK-NEXT:    ret void
;