mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
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.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91621 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
10
test/Transforms/InstCombine/memcpy.ll
Normal file
10
test/Transforms/InstCombine/memcpy.ll
Normal file
@@ -0,0 +1,10 @@
|
||||
; 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
|
Reference in New Issue
Block a user