llvm.org GIT mirror llvm / ea46827
Add the testcase from pr13254 (the old scalarreply pass handles this wrong; the new sroa pass handles it right). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165644 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan Sands 7 years ago
1 changed file(s) with 16 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
188188
189189 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
190190 declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
191
192 define i64 @test6(<4 x i64> %x, <4 x i64> %y, i64 %n) {
193 ; CHECK: @test6
194 ; The old scalarrepl pass would wrongly drop the store to the second alloca.
195 ; PR13254
196 %tmp = alloca { <4 x i64>, <4 x i64> }
197 %p0 = getelementptr inbounds { <4 x i64>, <4 x i64> }* %tmp, i32 0, i32 0
198 store <4 x i64> %x, <4 x i64>* %p0
199 ; CHECK: store <4 x i64> %x,
200 %p1 = getelementptr inbounds { <4 x i64>, <4 x i64> }* %tmp, i32 0, i32 1
201 store <4 x i64> %y, <4 x i64>* %p1
202 ; CHECK: store <4 x i64> %y,
203 %addr = getelementptr inbounds { <4 x i64>, <4 x i64> }* %tmp, i32 0, i32 0, i64 %n
204 %res = load i64* %addr, align 4
205 ret i64 %res
206 }