annotate test/Transforms/NewGVN/funclet.ll @ 146:3fc4d5c3e21e

set tail call flag for code segment in CGCAll
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 19:23:36 +0900
parents 803732b1fca8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 ; RUN: opt -basicaa -newgvn -S < %s | FileCheck %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2 target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 target triple = "i686-pc-windows-msvc"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5 %eh.ThrowInfo = type { i32, i8*, i8*, i8* }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 %struct.A = type { i32* }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 @"_TI1?AUA@@" = external constant %eh.ThrowInfo
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 define i8 @f() personality i32 (...)* @__CxxFrameHandler3 {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 %b = alloca i8
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 %c = alloca i8
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 store i8 42, i8* %b
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 store i8 13, i8* %c
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 invoke void @_CxxThrowException(i8* %b, %eh.ThrowInfo* nonnull @"_TI1?AUA@@")
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 to label %unreachable unwind label %catch.dispatch
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 catch.dispatch: ; preds = %entry
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 %cs1 = catchswitch within none [label %catch] unwind to caller
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 catch: ; preds = %catch.dispatch
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 %catchpad = catchpad within %cs1 [i8* null, i32 64, i8* null]
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 store i8 5, i8* %b
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 catchret from %catchpad to label %try.cont
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 try.cont: ; preds = %catch
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 %load_b = load i8, i8* %b
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 %load_c = load i8, i8* %c
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30 %add = add i8 %load_b, %load_c
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31 ret i8 %add
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33 unreachable: ; preds = %entry
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34 unreachable
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36 ; CHECK-LABEL: define i8 @f(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37 ; CHECK: %[[load_b:.*]] = load i8, i8* %b
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
38 ; CHECK-NEXT: %[[load_c:.*]] = load i8, i8* %c
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
39 ; CHECK-NEXT: %[[add:.*]] = add i8 %[[load_b]], %[[load_c]]
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
40 ; CHECK-NEXT: ret i8 %[[add]]
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
41
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42 declare i32 @__CxxFrameHandler3(...)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
43
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
44 declare x86_stdcallcc void @_CxxThrowException(i8*, %eh.ThrowInfo*)