summaryrefslogtreecommitdiff
path: root/test/CodeGen/SPARC
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-14 01:53:23 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-14 01:53:23 +0000
commitef596e1a80a9790efbc905c57b4e06ba6addb95a (patch)
tree69a3caabc4f6ed2b35bbb6ba132e14ecc4a99847 /test/CodeGen/SPARC
parent0ec587e26cd7e048b3150f89fa6d6245d5728cec (diff)
downloadllvm-ef596e1a80a9790efbc905c57b4e06ba6addb95a.tar.gz
llvm-ef596e1a80a9790efbc905c57b4e06ba6addb95a.tar.bz2
llvm-ef596e1a80a9790efbc905c57b4e06ba6addb95a.tar.xz
Fix patterns for 64-bit pointers.
This fixes the pic32 code model for SPARC v9. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SPARC')
-rw-r--r--test/CodeGen/SPARC/globals.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/globals.ll b/test/CodeGen/SPARC/globals.ll
index 869e9218e2..882fe7f510 100644
--- a/test/CodeGen/SPARC/globals.ll
+++ b/test/CodeGen/SPARC/globals.ll
@@ -1,6 +1,7 @@
; RUN: llc < %s -march=sparc -relocation-model=static -code-model=small | FileCheck --check-prefix=abs32 %s
; RUN: llc < %s -march=sparcv9 -relocation-model=static -code-model=small | FileCheck --check-prefix=abs32 %s
; RUN: llc < %s -march=sparc -relocation-model=pic -code-model=medium | FileCheck --check-prefix=v8pic32 %s
+; RUN: llc < %s -march=sparcv9 -relocation-model=pic -code-model=medium | FileCheck --check-prefix=v9pic32 %s
@G = external global i8
@@ -21,3 +22,11 @@ define zeroext i8 @loadG() {
; v8pic32: ld [%[[GOT:[gilo][0-7]]]+%[[Goffs]]], %[[Gaddr:[gilo][0-7]]]
; v8pic32: ldub [%[[Gaddr]]], %i0
; v8pic32: jmp %i7+8
+
+; v9pic32: loadG
+; v9pic32: _GLOBAL_OFFSET_TABLE_
+; v9pic32: sethi %hi(G), %[[R1:[gilo][0-7]]]
+; v9pic32: add %[[R1]], %lo(G), %[[Goffs:[gilo][0-7]]]
+; v9pic32: ldx [%[[GOT:[gilo][0-7]]]+%[[Goffs]]], %[[Gaddr:[gilo][0-7]]]
+; v9pic32: ldub [%[[Gaddr]]], %i0
+; v9pic32: jmp %i7+8