blob: 105709f12ecc68d0dd1698b37e65364c4a6d0928 [file] [log] [blame]
Andrew Lenharthace05652006-03-15 19:02:54 +00001; RUN: analyze %s -datastructure-gc -dsgc-check-flags=Xn:SMR
Andrew Lenharth34bf9732006-04-05 03:31:45 +00002; RUN: analyze %s -datastructure-gc -dsgc-check-flags=X:SMR
Chris Lattner7f007252004-02-13 16:04:51 +00003
Andrew Lenharthace05652006-03-15 19:02:54 +00004declare void %llvm.memcpy.i32(sbyte*, sbyte*, uint, uint)
5declare void %llvm.memmove.i32(sbyte*, sbyte*, uint, uint)
Chris Lattner7f007252004-02-13 16:04:51 +00006
7void %test() {
8 %X = alloca int
9 %Y = alloca int
10 %x = cast int* %X to sbyte*
11 %y = cast int* %Y to sbyte*
12 store int 4, int* %X
Andrew Lenharthace05652006-03-15 19:02:54 +000013 call void %llvm.memcpy.i32(sbyte* %x, sbyte* %y, uint 4, uint 4)
14 ret void
15}
16
17void %test2() {
18 %Xn = alloca int
19 %Yn = alloca int
20 %xn = cast int* %Xn to sbyte*
21 %yn = cast int* %Yn to sbyte*
22 store int 4, int* %Xn
23 call void %llvm.memmove.i32(sbyte* %xn, sbyte* %yn, uint 4, uint 4)
Chris Lattner7f007252004-02-13 16:04:51 +000024 ret void
25}