xref: /llvm-project/llvm/test/Transforms/SimplifyCFG/dbginfo.ll (revision f42482def236999b0f7896c09cd714b708861c8b)
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt < %s -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
3; RUN: opt < %s -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S --try-experimental-debuginfo-iterators | FileCheck %s
4
5  %llvm.dbg.anchor.type = type { i32, i32 }
6  %llvm.dbg.basictype.type = type { i32, ptr, ptr, ptr, i32, i64, i64, i64, i32, i32 }
7  %llvm.dbg.compile_unit.type = type { i32, ptr, i32, ptr, ptr, ptr, i1, i1, ptr }
8  %llvm.dbg.composite.type = type { i32, ptr, ptr, ptr, i32, i64, i64, i64, i32, ptr, ptr }
9  %llvm.dbg.derivedtype.type = type { i32, ptr, ptr, ptr, i32, i64, i64, i64, i32, ptr }
10  %llvm.dbg.global_variable.type = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, i1, i1, ptr }
11  %llvm.dbg.subprogram.type = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, i1, i1 }
12  %llvm.dbg.subrange.type = type { i32, i64, i64 }
13  %struct.Group = type { %struct.Scene, %struct.Sphere, %"struct.std::list<Scene*,std::allocator<Scene*> >" }
14  %struct.Ray = type { %struct.Vec, %struct.Vec }
15  %struct.Scene = type { ptr }
16  %struct.Sphere = type { %struct.Scene, %struct.Vec, double }
17  %struct.Vec = type { double, double, double }
18  %struct.__class_type_info_pseudo = type { %struct.__type_info_pseudo }
19  %struct.__false_type = type <{ i8 }>
20  %"struct.__gnu_cxx::new_allocator<Scene*>" = type <{ i8 }>
21  %"struct.__gnu_cxx::new_allocator<std::_List_node<Scene*> >" = type <{ i8 }>
22  %struct.__si_class_type_info_pseudo = type { %struct.__type_info_pseudo, ptr }
23  %struct.__type_info_pseudo = type { ptr, ptr }
24  %"struct.std::Hit" = type { double, %struct.Vec }
25  %"struct.std::_List_base<Scene*,std::allocator<Scene*> >" = type { %"struct.std::_List_base<Scene*,std::allocator<Scene*> >::_List_impl" }
26  %"struct.std::_List_base<Scene*,std::allocator<Scene*> >::_List_impl" = type { %"struct.std::_List_node_base" }
27  %"struct.std::_List_const_iterator<Scene*>" = type { ptr }
28  %"struct.std::_List_iterator<Scene*>" = type { ptr }
29  %"struct.std::_List_node<Scene*>" = type { %"struct.std::_List_node_base", ptr }
30  %"struct.std::_List_node_base" = type { ptr, ptr }
31  %"struct.std::allocator<Scene*>" = type <{ i8 }>
32  %"struct.std::allocator<std::_List_node<Scene*> >" = type <{ i8 }>
33  %"struct.std::basic_ios<char,std::char_traits<char> >" = type { %"struct.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
34  %"struct.std::basic_ostream<char,std::char_traits<char> >" = type { ptr, %"struct.std::basic_ios<char,std::char_traits<char> >" }
35  %"struct.std::basic_streambuf<char,std::char_traits<char> >" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"struct.std::locale" }
36  %"struct.std::ctype<char>" = type { %"struct.std::locale::facet", ptr, i8, ptr, ptr, ptr, i8, [256 x i8], [256 x i8], i8 }
37  %"struct.std::ios_base" = type { ptr, i32, i32, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"struct.std::locale" }
38  %"struct.std::ios_base::Init" = type <{ i8 }>
39  %"struct.std::ios_base::_Callback_list" = type { ptr, ptr, i32, i32 }
40  %"struct.std::ios_base::_Words" = type { ptr, i32 }
41  %"struct.std::list<Scene*,std::allocator<Scene*> >" = type { %"struct.std::_List_base<Scene*,std::allocator<Scene*> >" }
42  %"struct.std::locale" = type { ptr }
43  %"struct.std::locale::_Impl" = type { i32, ptr, i32, ptr, ptr }
44  %"struct.std::locale::facet" = type { ptr, i32 }
45  %"struct.std::num_get<char,std::istreambuf_iterator<char, std::char_traits<char> > >" = type { %"struct.std::locale::facet" }
46  %"struct.std::num_put<char,std::ostreambuf_iterator<char, std::char_traits<char> > >" = type { %"struct.std::locale::facet" }
47  %"struct.std::numeric_limits<double>" = type <{ i8 }>
48  %"struct.std::type_info" = type { ptr, ptr }
49@llvm.dbg.subprogram947 = external constant %llvm.dbg.subprogram.type		; <ptr> [#uses=1]
50
51declare void @llvm.dbg.func.start(ptr) nounwind
52
53declare void @llvm.dbg.region.end(ptr) nounwind
54
55declare void @_ZN9__gnu_cxx13new_allocatorIP5SceneED2Ev(ptr) nounwind
56
57define void @_ZNSaIP5SceneED1Ev(ptr %this) nounwind {
58; CHECK-LABEL: @_ZNSaIP5SceneED1Ev(
59; CHECK-NEXT:  entry:
60; CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca ptr, align 8
61; CHECK-NEXT:    %"alloca point" = bitcast i32 0 to i32
62; CHECK-NEXT:    call void @llvm.dbg.func.start(ptr @llvm.dbg.subprogram947)
63; CHECK-NEXT:    store ptr [[THIS:%.*]], ptr [[THIS_ADDR]], align 8
64; CHECK-NEXT:    [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
65; CHECK-NEXT:    call void @_ZN9__gnu_cxx13new_allocatorIP5SceneED2Ev(ptr [[TMP0]]) #[[ATTR0:[0-9]+]]
66; CHECK-NEXT:    call void @llvm.dbg.region.end(ptr @llvm.dbg.subprogram947)
67; CHECK-NEXT:    ret void
68;
69entry:
70  %this_addr = alloca ptr		; <ptr> [#uses=2]
71  %"alloca point" = bitcast i32 0 to i32		; <i32> [#uses=0]
72  call void @llvm.dbg.func.start(ptr @llvm.dbg.subprogram947)
73  store ptr %this, ptr %this_addr
74  %0 = load ptr, ptr %this_addr, align 4		; <ptr> [#uses=1]
75  call void @_ZN9__gnu_cxx13new_allocatorIP5SceneED2Ev(ptr %0) nounwind
76  br label %bb
77
78bb:		; preds = %entry
79  br label %return
80
81return:		; preds = %bb
82  call void @llvm.dbg.region.end(ptr @llvm.dbg.subprogram947)
83  ret void
84}
85