summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/2010-07-20-Switch.ll
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2011-12-05 21:03:03 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2011-12-05 21:03:03 +0000
commit34e3df76f99b036fdd92bc033bc12abff4c0fb74 (patch)
tree555395b8dd6ba3cd75c25b51cd605c068ff42d14 /llvm/test/CodeGen/Mips/2010-07-20-Switch.ll
parentdf5c121f8ed83da0df666734860762241ee450ca (diff)
downloadbcm5719-llvm-34e3df76f99b036fdd92bc033bc12abff4c0fb74.tar.gz
bcm5719-llvm-34e3df76f99b036fdd92bc033bc12abff4c0fb74.zip
Have LowerJumpTable support Mips64. Modify 2010-07-20-Switch.ll to test N64 and
O32 with relocation-model=pic too. llvm-svn: 145850
Diffstat (limited to 'llvm/test/CodeGen/Mips/2010-07-20-Switch.ll')
-rw-r--r--llvm/test/CodeGen/Mips/2010-07-20-Switch.ll18
1 files changed, 13 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/Mips/2010-07-20-Switch.ll b/llvm/test/CodeGen/Mips/2010-07-20-Switch.ll
index 83b8a250c20..23b5349ba81 100644
--- a/llvm/test/CodeGen/Mips/2010-07-20-Switch.ll
+++ b/llvm/test/CodeGen/Mips/2010-07-20-Switch.ll
@@ -1,13 +1,21 @@
-; RUN: llc < %s -march=mips -relocation-model=static | FileCheck %s
+; RUN: llc < %s -march=mips -relocation-model=static | FileCheck %s -check-prefix=STATIC-O32
+; RUN: llc < %s -march=mips -relocation-model=pic | FileCheck %s -check-prefix=PIC-O32
+; RUN: llc < %s -march=mips64 -relocation-model=pic -mcpu=mips64 -mattr=n64 | FileCheck %s -check-prefix=PIC-N64
define i32 @main() nounwind readnone {
entry:
%x = alloca i32, align 4 ; <i32*> [#uses=2]
store volatile i32 2, i32* %x, align 4
%0 = load volatile i32* %x, align 4 ; <i32> [#uses=1]
-; CHECK: lui $3, %hi($JTI0_0)
-; CHECK: addiu $3, $3, %lo($JTI0_0)
-; CHECK: sll $2, $2, 2
+; STATIC-O32: lui $[[R0:[0-9]+]], %hi($JTI0_0)
+; STATIC-O32: addiu ${{[0-9]+}}, $[[R0]], %lo($JTI0_0)
+; STATIC-O32: sll ${{[0-9]+}}, ${{[0-9]+}}, 2
+; 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-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]+}}, 2
switch i32 %0, label %bb4 [
i32 0, label %bb5
i32 1, label %bb1
@@ -18,7 +26,7 @@ entry:
bb1: ; preds = %entry
ret i32 2
-; CHECK: $BB0_2
+; CHECK: STATIC-O32: $BB0_2
bb2: ; preds = %entry
ret i32 0
OpenPOWER on IntegriCloud