comparison test/Transforms/InstCombine/alloca.ll @ 77:54457678186b LLVM3.6

LLVM 3.6
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Mon, 08 Sep 2014 22:06:00 +0900
parents 95c75e76d11b
children afa8332a0e37
comparison
equal deleted inserted replaced
34:e874dbf0ad9d 77:54457678186b
127 ; NODL: getelementptr inbounds [100 x i32]* %x1, i64 0, i64 0 127 ; NODL: getelementptr inbounds [100 x i32]* %x1, i64 0, i64 0
128 %x = alloca i32, i32 100 128 %x = alloca i32, i32 100
129 call void (...)* @use(i32* %x) 129 call void (...)* @use(i32* %x)
130 ret void 130 ret void
131 } 131 }
132
133 ; PR19569
134 %struct_type = type { i32, i32 }
135 declare void @test9_aux(<{ %struct_type }>* inalloca)
136 declare i8* @llvm.stacksave()
137 declare void @llvm.stackrestore(i8*)
138
139 define void @test9(%struct_type* %a) {
140 ; CHECK-LABEL: @test9(
141 entry:
142 %inalloca.save = call i8* @llvm.stacksave()
143 %argmem = alloca inalloca <{ %struct_type }>
144 ; CHECK: alloca inalloca i64, align 8
145 %0 = getelementptr inbounds <{ %struct_type }>* %argmem, i32 0, i32 0
146 %1 = bitcast %struct_type* %0 to i8*
147 %2 = bitcast %struct_type* %a to i8*
148 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* %2, i32 8, i32 4, i1 false)
149 call void @test9_aux(<{ %struct_type }>* inalloca %argmem)
150 call void @llvm.stackrestore(i8* %inalloca.save)
151 ret void
152 }