| Dan Gohman | 72a13d2 | 2009-09-08 22:34:10 +0000 | [diff] [blame] | 1 | ; RUN: opt %s -basicaa -gvn -dce -S | grep tmp7 | 
| Owen Anderson | 7827a3f | 2007-10-25 02:36:18 +0000 | [diff] [blame] | 2 |  | 
|  | 3 | %struct.A = type { i32 } | 
|  | 4 | %struct.B = type { %struct.A } | 
|  | 5 | @a = global %struct.B zeroinitializer           ; <%struct.B*> [#uses=2] | 
|  | 6 |  | 
|  | 7 | define i32 @_Z3fooP1A(%struct.A* %b) { | 
|  | 8 | entry: | 
|  | 9 | store i32 1, i32* getelementptr (%struct.B* @a, i32 0, i32 0, i32 0), align 8 | 
|  | 10 | %tmp4 = getelementptr %struct.A* %b, i32 0, i32 0               ;<i32*> [#uses=1] | 
|  | 11 | store i32 0, i32* %tmp4, align 4 | 
|  | 12 | %tmp7 = load i32* getelementptr (%struct.B* @a, i32 0, i32 0, i32 0), align 8           ; <i32> [#uses=1] | 
|  | 13 | ret i32 %tmp7 | 
|  | 14 | } |