1 ; RUN: opt < %s -passes=newgvn | llvm-dis
3 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
4 target triple = "i386-apple-darwin7"
5 %struct..4sPragmaType = type { ptr, i32 }
6 %struct.AggInfo = type { i8, i8, i32, ptr, i32, ptr, i32, i32, i32, ptr, i32, i32 }
7 %struct.AggInfo_col = type { ptr, i32, i32, i32, i32, ptr }
8 %struct.AggInfo_func = type { ptr, ptr, i32, i32 }
9 %struct.AuxData = type { ptr, ptr }
10 %struct.Bitvec = type { i32, i32, i32, { [125 x i32] } }
11 %struct.BtCursor = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, i32, %struct.CellInfo, i8, i8, ptr, i64, i32, i8, ptr }
12 %struct.BtLock = type { ptr, i32, i8, ptr }
13 %struct.BtShared = type { ptr, ptr, ptr, ptr, i8, i8, i8, i8, i8, i8, i8, i8, i32, i16, i16, i32, i32, i32, i32, i8, i32, ptr, ptr, ptr, %struct.BusyHandler, i32, ptr, ptr, ptr }
14 %struct.Btree = type { ptr, ptr, i8, i8, i8, i32, ptr, ptr }
15 %struct.BtreeMutexArray = type { i32, [11 x ptr] }
16 %struct.BusyHandler = type { ptr, ptr, i32 }
17 %struct.CellInfo = type { ptr, i64, i32, i32, i16, i16, i16, i16 }
18 %struct.CollSeq = type { ptr, i8, i8, ptr, ptr, ptr }
19 %struct.Column = type { ptr, ptr, ptr, ptr, i8, i8, i8, i8 }
20 %struct.Context = type { i64, i32, %struct.Fifo }
21 %struct.CountCtx = type { i64 }
22 %struct.Cursor = type { ptr, i32, i64, i64, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i64, ptr, i32, ptr, i64, ptr, ptr, i32, i64, ptr, ptr, i32, i32, ptr, ptr, ptr }
23 %struct.Db = type { ptr, ptr, i8, i8, ptr, ptr, ptr }
24 %struct.Expr = type { i8, i8, i16, ptr, ptr, ptr, ptr, %struct..4sPragmaType, %struct..4sPragmaType, i32, i32, ptr, i32, i32, ptr, ptr, i32 }
25 %struct.ExprList = type { i32, i32, i32, ptr }
26 %struct.ExprList_item = type { ptr, ptr, i8, i8, i8 }
27 %struct.FKey = type { ptr, ptr, ptr, ptr, i32, ptr, i8, i8, i8, i8 }
28 %struct.Fifo = type { i32, ptr, ptr }
29 %struct.FifoPage = type { i32, i32, i32, ptr, [1 x i64] }
30 %struct.FuncDef = type { i16, i8, i8, i8, ptr, ptr, ptr, ptr, ptr, [1 x i8] }
31 %struct.Hash = type { i8, i8, i32, i32, ptr, ptr }
32 %struct.HashElem = type { ptr, ptr, ptr, ptr, i32 }
33 %struct.IdList = type { ptr, i32, i32 }
34 %struct.Index = type { ptr, i32, ptr, ptr, ptr, i32, i8, i8, ptr, ptr, ptr, ptr, ptr }
35 %struct.KeyInfo = type { ptr, i8, i8, i8, i32, ptr, [1 x ptr] }
36 %struct.Mem = type { %struct.CountCtx, double, ptr, ptr, i32, i16, i8, i8, ptr }
37 %struct.MemPage = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, i16, i16, i16, i16, i16, [5 x %struct._OvflCell], ptr, ptr, ptr, i32, ptr }
38 %struct.Module = type { ptr, ptr, ptr, ptr }
39 %struct.Op = type { i8, i8, i8, i8, i32, i32, i32, { i32 } }
40 %struct.Pager = type { ptr, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.PagerLruList, ptr, ptr, ptr, i64, i64, i64, i64, i64, i32, ptr, ptr, i32, ptr, ptr, [16 x i8] }
41 %struct.PagerLruLink = type { ptr, ptr }
42 %struct.PagerLruList = type { ptr, ptr, ptr }
43 %struct.Parse = type { ptr, i32, ptr, ptr, i8, i8, i8, i8, i8, i8, i8, [8 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [12 x i32], i32, ptr, i32, i32, i32, i32, i32, ptr, i8, %struct..4sPragmaType, %struct..4sPragmaType, %struct..4sPragmaType, ptr, ptr, ptr, ptr, ptr, ptr, %struct..4sPragmaType, i8, ptr, i32 }
44 %struct.PgHdr = type { ptr, i32, ptr, ptr, %struct.PagerLruLink, ptr, i8, i8, i8, i8, i8, i16, ptr, ptr, ptr }
45 %struct.Schema = type { i32, %struct.Hash, %struct.Hash, %struct.Hash, %struct.Hash, ptr, i8, i8, i16, i32, ptr }
46 %struct.Select = type { ptr, i8, i8, i8, i8, i8, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, [3 x i32] }
47 %struct.SrcList = type { i16, i16, [1 x %struct.SrcList_item] }
48 %struct.SrcList_item = type { ptr, ptr, ptr, ptr, ptr, i8, i8, i32, ptr, ptr, i64 }
49 %struct.Table = type { ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i8, i8, i8, i8, i8, i8, i8, ptr, ptr, i32, ptr, ptr }
50 %struct.TableLock = type { i32, i32, i8, ptr }
51 %struct.Trigger = type { ptr, ptr, i8, i8, ptr, ptr, %struct..4sPragmaType, ptr, ptr, ptr, ptr }
52 %struct.TriggerStack = type { ptr, i32, i32, i32, i32, i32, i32, ptr, ptr }
53 %struct.TriggerStep = type { i32, i32, ptr, ptr, %struct..4sPragmaType, ptr, ptr, ptr, ptr, ptr }
54 %struct.Vdbe = type { ptr, ptr, ptr, i32, i32, ptr, i32, i32, ptr, ptr, ptr, i32, ptr, i32, ptr, ptr, i32, i32, i32, ptr, i32, i32, %struct.Fifo, i32, i32, ptr, i32, i32, i32, i32, i32, [25 x i32], i32, i32, ptr, ptr, ptr, i8, i8, i8, i8, i8, i8, i32, i64, i32, %struct.BtreeMutexArray, i32, ptr, i32 }
55 %struct.VdbeFunc = type { ptr, i32, [1 x %struct.AuxData] }
56 %struct._OvflCell = type { ptr, i16 }
57 %struct._ht = type { i32, ptr }
58 %struct.anon = type { double }
59 %struct.sColMap = type { i32, ptr }
60 %struct.sqlite3 = type { ptr, i32, ptr, i32, i32, i32, i32, i8, i8, i8, i8, i32, ptr, i64, i64, i32, i32, i32, ptr, %struct.sqlite3InitInfo, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.anon, ptr, ptr, ptr, ptr, i32, %struct.Hash, ptr, ptr, i32, %struct.Hash, %struct.Hash, %struct.BusyHandler, i32, [2 x %struct.Db], i8 }
61 %struct.sqlite3InitInfo = type { i32, i32, i8 }
62 %struct.sqlite3_context = type { ptr, ptr, %struct.Mem, ptr, i32, ptr }
63 %struct.sqlite3_file = type { ptr }
64 %struct.sqlite3_index_constraint = type { i32, i8, i8, i32 }
65 %struct.sqlite3_index_constraint_usage = type { i32, i8 }
66 %struct.sqlite3_index_info = type { i32, ptr, i32, ptr, ptr, i32, ptr, i32, i32, double }
67 %struct.sqlite3_io_methods = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
68 %struct.sqlite3_module = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
69 %struct.sqlite3_mutex = type opaque
70 %struct.sqlite3_vfs = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
71 %struct.sqlite3_vtab = type { ptr, i32, ptr }
72 %struct.sqlite3_vtab_cursor = type { ptr }
74 define fastcc void @sqlite3Insert(ptr %pParse, ptr %pTabList, ptr %pList, ptr %pSelect, ptr %pColumn, i32 %onError) nounwind {
76 br i1 false, label %bb54, label %bb69.loopexit
78 bb54: ; preds = %entry
79 br label %bb69.loopexit
81 bb59: ; preds = %bb63.preheader
82 %0 = load ptr, ptr %3, align 4 ; <ptr> [#uses=0]
85 bb65: ; preds = %bb63.preheader, %bb59
86 %1 = load ptr, ptr %4, align 4 ; <ptr> [#uses=0]
87 br i1 false, label %bb67, label %bb63.preheader
90 %2 = getelementptr %struct.IdList, ptr %pColumn, i32 0, i32 0 ; <ptr> [#uses=0]
93 bb69.loopexit: ; preds = %bb54, %entry
94 %3 = getelementptr %struct.IdList, ptr %pColumn, i32 0, i32 0 ; <ptr> [#uses=1]
95 %4 = getelementptr %struct.IdList, ptr %pColumn, i32 0, i32 0 ; <ptr> [#uses=1]
96 br label %bb63.preheader
98 bb63.preheader: ; preds = %bb69.loopexit, %bb65
99 br i1 false, label %bb59, label %bb65