1 ; RUN: llc < %s -mtriple=arm64-apple-ios7.0 | FileCheck %s
4 @G = external global i32
6 define i32 @test(i32 %off) nounwind {
8 ; CHECK: adrp x[[REG:[0-9]+]], _G@GOTPAGE
9 ; CHECK: ldr x[[REG2:[0-9]+]], [x[[REG]], _G@GOTPAGEOFF]
10 ; CHECK: add w0, w[[REG2]], w0
11 %tmp = ptrtoint i32* @G to i32
12 %tmp1 = add i32 %tmp, %off