File: funclet.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 (44 lines) | stat: -rw-r--r-- 1,454 bytes parent folder | download | duplicates (5)
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
; RUN: opt -passes=newgvn -S < %s | FileCheck %s
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i686-pc-windows-msvc"

%eh.ThrowInfo = type { i32, ptr, ptr, ptr }
%struct.A = type { ptr }

@"_TI1?AUA@@" = external constant %eh.ThrowInfo

define i8 @f() personality ptr @__CxxFrameHandler3 {
entry:
  %b = alloca i8
  %c = alloca i8
  store i8 42, ptr %b
  store i8 13, ptr %c
  invoke void @_CxxThrowException(ptr %b, ptr nonnull @"_TI1?AUA@@")
          to label %unreachable unwind label %catch.dispatch

catch.dispatch:                                   ; preds = %entry
  %cs1 = catchswitch within none [label %catch] unwind to caller

catch:                                            ; preds = %catch.dispatch
  %catchpad = catchpad within %cs1 [ptr null, i32 64, ptr null]
  store i8 5, ptr %b
  catchret from %catchpad to label %try.cont

try.cont:                                         ; preds = %catch
  %load_b = load i8, ptr %b
  %load_c = load i8, ptr %c
  %add = add i8 %load_b, %load_c
  ret i8 %add

unreachable:                                      ; preds = %entry
  unreachable
}
; CHECK-LABEL: define i8 @f(
; CHECK:       %[[load_b:.*]] = load i8, ptr %b
; CHECK-NEXT:  %[[load_c:.*]] = load i8, ptr %c
; CHECK-NEXT:  %[[add:.*]] = add i8 %[[load_b]], %[[load_c]]
; CHECK-NEXT:  ret i8 %[[add]]

declare i32 @__CxxFrameHandler3(...)

declare x86_stdcallcc void @_CxxThrowException(ptr, ptr)