2008-02-14 06:56:27 +00:00
|
|
|
; RUN: llvm-as < %s | opt -anders-aa -load-vn -gcse -deadargelim | llvm-dis | not grep ARG
|
2004-05-23 21:31:00 +00:00
|
|
|
|
2008-02-14 06:56:27 +00:00
|
|
|
@G = internal constant i32* null
|
2004-05-23 21:31:00 +00:00
|
|
|
|
2008-02-14 06:56:27 +00:00
|
|
|
define internal i32 @internal(i32* %ARG) {
|
2004-05-23 21:31:00 +00:00
|
|
|
;; The 'Arg' argument must-aliases the null pointer, so it can be subsituted
|
|
|
|
;; directly here, making it dead.
|
2008-02-14 06:56:27 +00:00
|
|
|
store i32* %ARG, i32** @G
|
|
|
|
ret i32 0
|
2004-05-23 21:31:00 +00:00
|
|
|
}
|
|
|
|
|
2008-02-14 06:56:27 +00:00
|
|
|
define i32 @foo() {
|
|
|
|
%V = call i32 @internal(i32* null)
|
|
|
|
ret i32 %V
|
2004-05-23 21:31:00 +00:00
|
|
|
}
|