Upgrade tests to not use llvm-upgrade.
[oota-llvm.git] / test / Transforms / InstCombine / memmove.ll
1 ; This test makes sure that memmove instructions are properly eliminated.
2 ;
3 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
4 ; RUN:    not grep {call void @llvm.memmove}
5
6 @S = internal constant [33 x i8] c"panic: restorelist inconsistency\00"         ; <[33 x i8]*> [#uses=1]
7
8 declare void @llvm.memmove.i32(i8*, i8*, i32, i32)
9
10 define void @test1(i8* %A, i8* %B, i32 %N) {
11         call void @llvm.memmove.i32( i8* %A, i8* %B, i32 0, i32 1 )
12         ret void
13 }
14
15 define void @test2(i8* %A, i32 %N) {
16         ;; dest can't alias source since we can't write to source!
17         call void @llvm.memmove.i32( i8* %A, i8* getelementptr ([33 x i8]* @S, i32 0, i32 0), i32 %N, i32 1 )
18         ret void
19 }