2005-02-27 18:48:19 +00:00
|
|
|
; both globals are write only, delete them.
|
|
|
|
|
2007-04-15 08:30:33 +00:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | \
|
|
|
|
; RUN: not grep internal
|
|
|
|
|
2005-02-27 18:48:19 +00:00
|
|
|
%G0 = internal global [58 x sbyte] c"asdlfkajsdlfkajsd;lfkajds;lfkjasd;flkajsd;lkfja;sdlkfjasd\00"
|
|
|
|
|
|
|
|
%G1 = internal global [4 x int] [ int 1, int 2, int 3, int 4]
|
|
|
|
|
|
|
|
implementation ; Functions:
|
|
|
|
|
2007-04-15 08:30:33 +00:00
|
|
|
declare void %llvm.memcpy.i32(sbyte*, sbyte*, uint, uint)
|
|
|
|
declare void %llvm.memset.i32(sbyte*, ubyte, uint, uint)
|
2005-02-27 18:48:19 +00:00
|
|
|
|
|
|
|
void %foo() {
|
|
|
|
%Blah = alloca [58 x sbyte] ; <[58 x sbyte]*> [#uses=2]
|
|
|
|
%tmp3 = cast [58 x sbyte]* %Blah to sbyte*
|
2007-04-15 08:30:33 +00:00
|
|
|
call void %llvm.memcpy.i32( sbyte* cast ([4 x int]* %G1 to sbyte*), sbyte* %tmp3, uint 16, uint 1)
|
2007-04-16 02:09:24 +00:00
|
|
|
call void %llvm.memset.i32( sbyte* getelementptr ([58 x sbyte]* %G0, int 0, int 0), ubyte 17, uint 58, uint 1)
|
2005-02-27 18:48:19 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
|