1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 16:33:37 +01:00
llvm-mirror/test/Transforms/InstCombine/memcpy.ll
Eli Friedman ff5c248066 Slightly generalize transformation of memmove(a,a,n) so that it also applies
to memcpy. (Such a memcpy is technically illegal, but in practice is safe
and is generated by struct self-assignment in C code.)

llvm-svn: 91621
2009-12-17 21:07:31 +00:00

11 lines
272 B
LLVM

; RUN: opt < %s -instcombine -S | FileCheck %s
declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
define void @test4(i8* %a) {
tail call void @llvm.memcpy.i32( i8* %a, i8* %a, i32 100, i32 1 )
ret void
}
; CHECK: define void @test4
; CHECK-NEXT: ret void