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 6 declare void @llvm.memmove.i32(i8*, i8*, i32, i32) 7 8 declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) 9 10 declare void @llvm.memset.i32(i8*, i8, i32, i32) 11 12 define void @zero_byte_test() { 13 ; These process zero bytes, so they are a noop. 14 call void @llvm.memmove.i32( i8* @X, i8* @Y, i32 0, i32 100 ) 15 call void @llvm.memcpy.i32( i8* @X, i8* @Y, i32 0, i32 100 ) 16 call void @llvm.memset.i32( i8* @X, i8 123, i32 0, i32 100 ) 17 ret void 18 } 19 20