source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/AArch64/arm64-global-address.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 373 bytes
Line 
1; RUN: llc < %s -mtriple=arm64-apple-ios7.0 | FileCheck %s
2; rdar://9618644
3
4@G = external global i32
5
6define i32 @test(i32 %off) nounwind {
7; CHECK-LABEL: test:
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
13  ret i32 %tmp1
14}
Note: See TracBrowser for help on using the repository browser.