Andrew Lenharth | ace0565 | 2006-03-15 19:02:54 +0000 | [diff] [blame] | 1 | ; RUN: analyze %s -datastructure-gc -dsgc-check-flags=Xn:SMR |
Andrew Lenharth | 34bf973 | 2006-04-05 03:31:45 +0000 | [diff] [blame^] | 2 | ; RUN: analyze %s -datastructure-gc -dsgc-check-flags=X:SMR |
Chris Lattner | 7f00725 | 2004-02-13 16:04:51 +0000 | [diff] [blame] | 3 | |
Andrew Lenharth | ace0565 | 2006-03-15 19:02:54 +0000 | [diff] [blame] | 4 | declare void %llvm.memcpy.i32(sbyte*, sbyte*, uint, uint) |
| 5 | declare void %llvm.memmove.i32(sbyte*, sbyte*, uint, uint) |
Chris Lattner | 7f00725 | 2004-02-13 16:04:51 +0000 | [diff] [blame] | 6 | |
| 7 | void %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 Lenharth | ace0565 | 2006-03-15 19:02:54 +0000 | [diff] [blame] | 13 | call void %llvm.memcpy.i32(sbyte* %x, sbyte* %y, uint 4, uint 4) |
| 14 | ret void |
| 15 | } |
| 16 | |
| 17 | void %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 Lattner | 7f00725 | 2004-02-13 16:04:51 +0000 | [diff] [blame] | 24 | ret void |
| 25 | } |