2009-09-11 18:01:28 +00:00
|
|
|
; RUN: opt < %s -globalopt -S | not grep %G
|
2004-10-08 20:57:46 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
@G = internal global i32 0 ; <i32*> [#uses=1]
|
|
|
|
@H = internal global { i32* } { i32* @G } ; <{ i32* }*> [#uses=1]
|
2004-10-08 20:57:46 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define i32 @loadg() {
|
2015-03-13 18:20:45 +00:00
|
|
|
%G = load i32*, i32** getelementptr ({ i32* }, { i32* }* @H, i32 0, i32 0) ; <i32*> [#uses=1]
|
2015-02-27 21:17:42 +00:00
|
|
|
%GV = load i32, i32* %G ; <i32> [#uses=1]
|
2008-03-01 09:15:35 +00:00
|
|
|
ret i32 %GV
|
2004-10-08 20:57:46 +00:00
|
|
|
}
|
2008-03-01 09:15:35 +00:00
|
|
|
|