1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=arm64-apple-ios -O2 -aarch64-collect-loh -aarch64-collect-loh-bb-only=false < %s -o - | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; Test case for <rdar://problem/15942912>. 3*9880d681SAndroid Build Coastguard Worker; AdrpAddStr cannot be used when the store uses same 4*9880d681SAndroid Build Coastguard Worker; register as address and value. Indeed, the related 5*9880d681SAndroid Build Coastguard Worker; if applied, may completely remove the definition or 6*9880d681SAndroid Build Coastguard Worker; at least provide a wrong one (with the offset folded 7*9880d681SAndroid Build Coastguard Worker; into the definition). 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker%struct.anon = type { i32*, i32** } 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Worker@pptp_wan_head = internal global %struct.anon zeroinitializer, align 8 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: _pptp_wan_init 14*9880d681SAndroid Build Coastguard Worker; CHECK: ret 15*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: AdrpAddStr 16*9880d681SAndroid Build Coastguard Workerdefine i32 @pptp_wan_init() { 17*9880d681SAndroid Build Coastguard Workerentry: 18*9880d681SAndroid Build Coastguard Worker store i32* null, i32** getelementptr inbounds (%struct.anon, %struct.anon* @pptp_wan_head, i64 0, i32 0), align 8 19*9880d681SAndroid Build Coastguard Worker store i32** getelementptr inbounds (%struct.anon, %struct.anon* @pptp_wan_head, i64 0, i32 0), i32*** getelementptr inbounds (%struct.anon, %struct.anon* @pptp_wan_head, i64 0, i32 1), align 8 20*9880d681SAndroid Build Coastguard Worker ret i32 0 21*9880d681SAndroid Build Coastguard Worker} 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker 24