1; RUN: opt < %s -instcombine | llvm-dis
2
3@X = global i8 0                ; <i8*> [#uses=3]
4@Y = global i8 12               ; <i8*> [#uses=2]
5
6declare void @llvm.memmove.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
7
8declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
9
10declare void @llvm.memset.p0i8.i32(i8*, i8, i32, i32, i1)
11
12define void @zero_byte_test() {
13        ; These process zero bytes, so they are a noop.
14        call void @llvm.memmove.p0i8.p0i8.i32( i8* @X, i8* @Y, i32 0, i32 128, i1 false )
15        call void @llvm.memcpy.p0i8.p0i8.i32( i8* @X, i8* @Y, i32 0, i32 128, i1 false )
16        call void @llvm.memset.p0i8.i32( i8* @X, i8 123, i32 0, i32 128, i1 false )
17        ret void
18}
19
20