1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -basicaa -gvn -dce -S | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker %struct.A = type { i32 } 4*9880d681SAndroid Build Coastguard Worker %struct.B = type { %struct.A } 5*9880d681SAndroid Build Coastguard Worker@a = global %struct.B zeroinitializer ; <%struct.B*> [#uses=2] 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Workerdefine i32 @_Z3fooP1A(%struct.A* %b) { 8*9880d681SAndroid Build Coastguard Worker; CHECK: %tmp7 = load 9*9880d681SAndroid Build Coastguard Worker; CHECK: ret i32 %tmp7 10*9880d681SAndroid Build Coastguard Workerentry: 11*9880d681SAndroid Build Coastguard Worker store i32 1, i32* getelementptr (%struct.B, %struct.B* @a, i32 0, i32 0, i32 0), align 8 12*9880d681SAndroid Build Coastguard Worker %tmp4 = getelementptr %struct.A, %struct.A* %b, i32 0, i32 0 ;<i32*> [#uses=1] 13*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %tmp4, align 4 14*9880d681SAndroid Build Coastguard Worker %tmp7 = load i32, i32* getelementptr (%struct.B, %struct.B* @a, i32 0, i32 0, i32 0), align 8 ; <i32> [#uses=1] 15*9880d681SAndroid Build Coastguard Worker ret i32 %tmp7 16*9880d681SAndroid Build Coastguard Worker} 17