blob: 442af9850c03a0104e1030be7825a672c36b0826 [file] [log] [blame]
Chris Lattnerb503cc42005-02-27 18:48:19 +00001; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep internal
2; both globals are write only, delete them.
3
4%G0 = internal global [58 x sbyte] c"asdlfkajsdlfkajsd;lfkajds;lfkjasd;flkajsd;lkfja;sdlkfjasd\00"
5
6%G1 = internal global [4 x int] [ int 1, int 2, int 3, int 4]
7
8implementation ; Functions:
9
10declare void %llvm.memcpy(sbyte*, sbyte*, uint, uint)
11declare void %llvm.memset(sbyte*, ubyte, uint, uint)
12
13void %foo() {
14 %Blah = alloca [58 x sbyte] ; <[58 x sbyte]*> [#uses=2]
15 %tmp3 = cast [58 x sbyte]* %Blah to sbyte*
16 call void %llvm.memcpy( sbyte* cast ([4 x int]* %G1 to sbyte*), sbyte* %tmp3, uint 16, uint 1)
17 call void %llvm.memset( sbyte* getelementptr ([58 x sbyte]* %G0, int 0, int 0), ubyte 17, uint 58, uint 1)
18 ret void
19}
20
21