1; RUN: opt < %s -instcombine -S | FileCheck %s 2 3declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind 4declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind 5 6define void @test1(i8* %a) { 7 tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a, i8* %a, i32 100, i32 1, i1 false) 8 ret void 9; CHECK-LABEL: define void @test1( 10; CHECK-NEXT: ret void 11} 12 13 14; PR8267 15define void @test2(i8* %a) { 16 tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a, i8* %a, i32 100, i32 1, i1 true) 17 ret void 18; CHECK-LABEL: define void @test2( 19; CHECK-NEXT: call void @llvm.memcpy 20} 21 22define void @test3(i8* %d, i8* %s) { 23 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %d, i8* %s, i64 17179869184, i32 4, i1 false) 24 ret void 25; CHECK-LABEL: define void @test3( 26; CHECK-NEXT: call void @llvm.memcpy 27} 28