aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-04-09 20:32:12 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-04-09 20:32:12 +0000
commit787c3fd385834db61bd955dcc40fb02b77c183a9 (patch)
treec836d49c2234c032a6650afa4c59490c9997ba8e /test/CodeGen
parent7f354557089d93cc681c440f9e064c906e1fbd58 (diff)
downloadexternal_llvm-787c3fd385834db61bd955dcc40fb02b77c183a9.zip
external_llvm-787c3fd385834db61bd955dcc40fb02b77c183a9.tar.gz
external_llvm-787c3fd385834db61bd955dcc40fb02b77c183a9.tar.bz2
Have TargetLowering::getPICJumpTableRelocBase return a node that points to the
GOT if jump table uses 64-bit gp-relative relocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/Mips/2010-07-20-Switch.ll4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/2010-07-20-Switch.ll b/test/CodeGen/Mips/2010-07-20-Switch.ll
index 785a416..aaf6767 100644
--- a/test/CodeGen/Mips/2010-07-20-Switch.ll
+++ b/test/CodeGen/Mips/2010-07-20-Switch.ll
@@ -13,9 +13,13 @@ entry:
; PIC-O32: lw $[[R0:[0-9]+]], %got($JTI0_0)
; PIC-O32: addiu ${{[0-9]+}}, $[[R0]], %lo($JTI0_0)
; PIC-O32: sll ${{[0-9]+}}, ${{[0-9]+}}, 2
+; PIC-O32: addu $[[R1:[0-9]+]], ${{[0-9]+}}, $gp
+; PIC-O32: jr $[[R1]]
; PIC-N64: ld $[[R0:[0-9]+]], %got_page($JTI0_0)
; PIC-N64: daddiu ${{[0-9]+}}, $[[R0]], %got_ofst($JTI0_0)
; PIC-N64: dsll ${{[0-9]+}}, ${{[0-9]+}}, 3
+; PIC-N64: daddu $[[R1:[0-9]+]], ${{[0-9]+}}, $gp
+; PIC-N64: jr $[[R1]]
switch i32 %0, label %bb4 [
i32 0, label %bb5
i32 1, label %bb1