1 ; RUN: opt -dse -S < %s | FileCheck %s
2 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-f128:128:128-n8:16:32:64"
3 target triple = "x86_64-unknown-linux-gnu"
5 %struct.pair.162 = type { %struct.BasicBlock*, i32, [4 x i8] }
6 %struct.BasicBlock = type { %struct.Value, %struct.ilist_node.24, %struct.iplist.22, %struct.Function* }
7 %struct.Value = type { i32 (...)**, i8, i8, i16, %struct.Type*, %struct.Use*, %struct.StringMapEntry* }
8 %struct.Type = type { %struct.LLVMContext*, i8, [3 x i8], i32, {}* }
9 %struct.LLVMContext = type { %struct.LLVMContextImpl* }
10 %struct.LLVMContextImpl = type opaque
11 %struct.Use = type { %struct.Value*, %struct.Use*, %struct.PointerIntPair }
12 %struct.PointerIntPair = type { i64 }
13 %struct.StringMapEntry = type opaque
14 %struct.ilist_node.24 = type { %struct.ilist_half_node.23, %struct.BasicBlock* }
15 %struct.ilist_half_node.23 = type { %struct.BasicBlock* }
16 %struct.iplist.22 = type { %struct.ilist_traits.21, %struct.Instruction* }
17 %struct.ilist_traits.21 = type { %struct.ilist_half_node.25 }
18 %struct.ilist_half_node.25 = type { %struct.Instruction* }
19 %struct.Instruction = type { [52 x i8], %struct.ilist_node.26, %struct.BasicBlock*, %struct.DebugLoc }
20 %struct.ilist_node.26 = type { %struct.ilist_half_node.25, %struct.Instruction* }
21 %struct.DebugLoc = type { i32, i32 }
22 %struct.Function = type { %struct.GlobalValue, %struct.ilist_node.14, %struct.iplist.4, %struct.iplist, %struct.ValueSymbolTable*, %struct.AttrListPtr }
23 %struct.GlobalValue = type <{ [52 x i8], [4 x i8], %struct.Module*, i8, i16, [5 x i8], %struct.basic_string }>
24 %struct.Module = type { %struct.LLVMContext*, %struct.iplist.20, %struct.iplist.16, %struct.iplist.12, %struct.vector.2, %struct.ilist, %struct.basic_string, %struct.ValueSymbolTable*, %struct.OwningPtr, %struct.basic_string, %struct.basic_string, %struct.basic_string, i8* }
25 %struct.iplist.20 = type { %struct.ilist_traits.19, %struct.GlobalVariable* }
26 %struct.ilist_traits.19 = type { %struct.ilist_node.18 }
27 %struct.ilist_node.18 = type { %struct.ilist_half_node.17, %struct.GlobalVariable* }
28 %struct.ilist_half_node.17 = type { %struct.GlobalVariable* }
29 %struct.GlobalVariable = type { %struct.GlobalValue, %struct.ilist_node.18, i8, [7 x i8] }
30 %struct.iplist.16 = type { %struct.ilist_traits.15, %struct.Function* }
31 %struct.ilist_traits.15 = type { %struct.ilist_node.14 }
32 %struct.ilist_node.14 = type { %struct.ilist_half_node.13, %struct.Function* }
33 %struct.ilist_half_node.13 = type { %struct.Function* }
34 %struct.iplist.12 = type { %struct.ilist_traits.11, %struct.GlobalAlias* }
35 %struct.ilist_traits.11 = type { %struct.ilist_node.10 }
36 %struct.ilist_node.10 = type { %struct.ilist_half_node.9, %struct.GlobalAlias* }
37 %struct.ilist_half_node.9 = type { %struct.GlobalAlias* }
38 %struct.GlobalAlias = type { %struct.GlobalValue, %struct.ilist_node.10 }
39 %struct.vector.2 = type { %struct._Vector_base.1 }
40 %struct._Vector_base.1 = type { %struct._Vector_impl.0 }
41 %struct._Vector_impl.0 = type { %struct.basic_string*, %struct.basic_string*, %struct.basic_string* }
42 %struct.basic_string = type { %struct._Alloc_hider }
43 %struct._Alloc_hider = type { i8* }
44 %struct.ilist = type { %struct.iplist.8 }
45 %struct.iplist.8 = type { %struct.ilist_traits.7, %struct.NamedMDNode* }
46 %struct.ilist_traits.7 = type { %struct.ilist_node.6 }
47 %struct.ilist_node.6 = type { %struct.ilist_half_node.5, %struct.NamedMDNode* }
48 %struct.ilist_half_node.5 = type { %struct.NamedMDNode* }
49 %struct.NamedMDNode = type { %struct.ilist_node.6, %struct.basic_string, %struct.Module*, i8* }
50 %struct.ValueSymbolTable = type opaque
51 %struct.OwningPtr = type { %struct.GVMaterializer* }
52 %struct.GVMaterializer = type opaque
53 %struct.iplist.4 = type { %struct.ilist_traits.3, %struct.BasicBlock* }
54 %struct.ilist_traits.3 = type { %struct.ilist_half_node.23 }
55 %struct.iplist = type { %struct.ilist_traits, %struct.Argument* }
56 %struct.ilist_traits = type { %struct.ilist_half_node }
57 %struct.ilist_half_node = type { %struct.Argument* }
58 %struct.Argument = type { %struct.Value, %struct.ilist_node, %struct.Function* }
59 %struct.ilist_node = type { %struct.ilist_half_node, %struct.Argument* }
60 %struct.AttrListPtr = type { %struct.AttributeListImpl* }
61 %struct.AttributeListImpl = type opaque
63 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) nounwind
65 ; CHECK: _ZSt9iter_swapIPSt4pairIPN4llvm10BasicBlockEjES5_EvT_T0_
68 define void @_ZSt9iter_swapIPSt4pairIPN4llvm10BasicBlockEjES5_EvT_T0_(%struct.pair.162* %__a, %struct.pair.162* %__b) nounwind uwtable inlinehint {
70 %memtmp = alloca %struct.pair.162, align 8
71 %0 = getelementptr inbounds %struct.pair.162, %struct.pair.162* %memtmp, i64 0, i32 0
72 %1 = getelementptr inbounds %struct.pair.162, %struct.pair.162* %__a, i64 0, i32 0
73 %2 = load %struct.BasicBlock*, %struct.BasicBlock** %1, align 8
74 store %struct.BasicBlock* %2, %struct.BasicBlock** %0, align 8
75 %3 = getelementptr inbounds %struct.pair.162, %struct.pair.162* %memtmp, i64 0, i32 1
76 %4 = getelementptr inbounds %struct.pair.162, %struct.pair.162* %__a, i64 0, i32 1
77 %5 = load i32, i32* %4, align 4
78 store i32 %5, i32* %3, align 8
79 %6 = bitcast %struct.pair.162* %__a to i8*
80 %7 = bitcast %struct.pair.162* %__b to i8*
81 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %6, i8* %7, i64 12, i1 false)
82 %8 = bitcast %struct.pair.162* %memtmp to i8*
83 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %7, i8* %8, i64 12, i1 false)