File: loopsink-pr38462.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 (65 lines) | stat: -rw-r--r-- 1,725 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
; RUN: opt -S -verify-memoryssa -passes=loop-sink < %s | FileCheck %s
; RUN: opt -S -verify-memoryssa -aa-pipeline=basic-aa -passes=loop-sink < %s | FileCheck %s

target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc19.13.26128"

%struct.FontInfoData = type { ptr }
%struct.S = type { i8 }

; CHECK: @pr38462
; Make sure not to assert by trying to sink into catch.dispatch.

define void @pr38462(ptr %this) personality ptr @__C_specific_handler !prof !1 {
entry:
  %s = alloca %struct.S
  %call6 = call i32 @f()
  %tobool7 = icmp eq i32 %call6, 0
  br i1 %tobool7, label %for.body.lr.ph, label %for.cond.cleanup

for.body.lr.ph:
  br label %for.body

for.cond.cleanup.loopexit:
  br label %for.cond.cleanup

for.cond.cleanup:
  ret void

for.body:
  %call2 = invoke i32 @f() to label %__try.cont unwind label %catch.dispatch

catch.dispatch:
  %0 = catchswitch within none [label %__except] unwind to caller

__except:
  %1 = catchpad within %0 [ptr null]
  catchret from %1 to label %__except3

__except3:
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %s)
  %call.i = call zeroext i1 @g(ptr nonnull %s)
  br i1 %call.i, label %if.then.i, label %exit

if.then.i:
  %call2.i = call i32 @f()
  br label %exit

exit:
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %s)
  br label %__try.cont

__try.cont:
  %call = call i32 @f()
  %tobool = icmp eq i32 %call, 0
  br i1 %tobool, label %for.body, label %for.cond.cleanup.loopexit
}

declare i32 @__C_specific_handler(...)
declare i32 @f()
declare zeroext i1 @g(ptr)
declare void @llvm.lifetime.start.p0(i64, ptr nocapture)
declare void @llvm.lifetime.end.p0(i64, ptr nocapture)

!1 = !{!"function_entry_count", i64 1}