1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-apple-darwin -o %t1 2*9880d681SAndroid Build Coastguard Worker; RUN: grep GOTPCREL %t1 | count 4 3*9880d681SAndroid Build Coastguard Worker; RUN: grep %%rip %t1 | count 6 4*9880d681SAndroid Build Coastguard Worker; RUN: grep movq %t1 | count 6 5*9880d681SAndroid Build Coastguard Worker; RUN: grep leaq %t1 | count 1 6*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=static -o %t2 7*9880d681SAndroid Build Coastguard Worker; RUN: grep movl %t2 | count 2 8*9880d681SAndroid Build Coastguard Worker; RUN: grep movq %t2 | count 2 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Worker@ptr = external global i32* ; <i32**> [#uses=1] 11*9880d681SAndroid Build Coastguard Worker@src = external global [0 x i32] ; <[0 x i32]*> [#uses=1] 12*9880d681SAndroid Build Coastguard Worker@dst = external global [0 x i32] ; <[0 x i32]*> [#uses=1] 13*9880d681SAndroid Build Coastguard Worker@lptr = internal global i32* null ; <i32**> [#uses=1] 14*9880d681SAndroid Build Coastguard Worker@ldst = internal global [500 x i32] zeroinitializer, align 32 ; <[500 x i32]*> [#uses=1] 15*9880d681SAndroid Build Coastguard Worker@lsrc = internal global [500 x i32] zeroinitializer, align 32 ; <[500 x i32]*> [#uses=0] 16*9880d681SAndroid Build Coastguard Worker@bsrc = internal global [500000 x i32] zeroinitializer, align 32 ; <[500000 x i32]*> [#uses=0] 17*9880d681SAndroid Build Coastguard Worker@bdst = internal global [500000 x i32] zeroinitializer, align 32 ; <[500000 x i32]*> [#uses=0] 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Workerdefine void @test1() nounwind { 20*9880d681SAndroid Build Coastguard Worker %tmp = load i32, i32* getelementptr ([0 x i32], [0 x i32]* @src, i32 0, i32 0) ; <i32> [#uses=1] 21*9880d681SAndroid Build Coastguard Worker store i32 %tmp, i32* getelementptr ([0 x i32], [0 x i32]* @dst, i32 0, i32 0) 22*9880d681SAndroid Build Coastguard Worker ret void 23*9880d681SAndroid Build Coastguard Worker} 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Workerdefine void @test2() nounwind { 26*9880d681SAndroid Build Coastguard Worker store i32* getelementptr ([0 x i32], [0 x i32]* @dst, i32 0, i32 0), i32** @ptr 27*9880d681SAndroid Build Coastguard Worker ret void 28*9880d681SAndroid Build Coastguard Worker} 29*9880d681SAndroid Build Coastguard Worker 30*9880d681SAndroid Build Coastguard Workerdefine void @test3() nounwind { 31*9880d681SAndroid Build Coastguard Worker store i32* getelementptr ([500 x i32], [500 x i32]* @ldst, i32 0, i32 0), i32** @lptr 32*9880d681SAndroid Build Coastguard Worker br label %return 33*9880d681SAndroid Build Coastguard Worker 34*9880d681SAndroid Build Coastguard Workerreturn: ; preds = %0 35*9880d681SAndroid Build Coastguard Worker ret void 36*9880d681SAndroid Build Coastguard Worker} 37