summaryrefslogtreecommitdiff
path: root/test/Analysis/DSGraph/2004-02-13-memcpy.ll
blob: d580097e92733fe62e85c00835254074d7964a02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=Xn:SMR &&
; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=X:SMR

declare void %llvm.memcpy.i32(sbyte*, sbyte*, uint, uint)
declare void %llvm.memmove.i32(sbyte*, sbyte*, uint, uint)

void %test() {
	%X = alloca int
	%Y = alloca int
	%x = cast int* %X to sbyte*
	%y = cast int* %Y to sbyte*
	store int 4, int* %X
	call void %llvm.memcpy.i32(sbyte* %x, sbyte* %y, uint 4, uint 4)
	ret void
}

void %test2() {
	%Xn = alloca int
	%Yn = alloca int
	%xn = cast int* %Xn to sbyte*
	%yn = cast int* %Yn to sbyte*
	store int 4, int* %Xn
	call void %llvm.memmove.i32(sbyte* %xn, sbyte* %yn, uint 4, uint 4)
	ret void
}