summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SPARC/pic.ll
blob: 4edbffcc12baa4cb64f1ddae50fd091a8b8c2ee4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; RUN: llc < %s -relocation-model=pic -mtriple=sparc | FileCheck %s

@value = external global i32

define i32 @test() nounwind {
; CHECK:    ld [%i0+value], %i0
entry:
  %0 = load i32, i32* @value
  ret i32 %0
}

!llvm.module.flags = !{!0}

!0 = !{i32 7, !"PIC Level", i32 1}
OpenPOWER on IntegriCloud