summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/2010-07-20-Switch.ll
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-06-13 20:33:18 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-06-13 20:33:18 +0000
commitdf5205ef3d5eef89c539e82a5e99100397d821c6 (patch)
tree3a63f588d17262b86af461ba41fcc6be4a99240b /llvm/test/CodeGen/Mips/2010-07-20-Switch.ll
parent8acadcb84bcb70e1eea08cf261a2f4f5973578c3 (diff)
downloadbcm5719-llvm-df5205ef3d5eef89c539e82a5e99100397d821c6.tar.gz
bcm5719-llvm-df5205ef3d5eef89c539e82a5e99100397d821c6.zip
Implement a DAGCombine in MipsISelLowering.cpp which transforms the following
pattern: (add v0, (add v1, abs_lo(tjt))) => (add (add v0, v1), abs_lo(tjt)) "tjt" is a TargetJumpTable node. llvm-svn: 158419
Diffstat (limited to 'llvm/test/CodeGen/Mips/2010-07-20-Switch.ll')
-rw-r--r--llvm/test/CodeGen/Mips/2010-07-20-Switch.ll25
1 files changed, 12 insertions, 13 deletions
diff --git a/llvm/test/CodeGen/Mips/2010-07-20-Switch.ll b/llvm/test/CodeGen/Mips/2010-07-20-Switch.ll
index 7e98ff774d8..ceaf2af5f64 100644
--- a/llvm/test/CodeGen/Mips/2010-07-20-Switch.ll
+++ b/llvm/test/CodeGen/Mips/2010-07-20-Switch.ll
@@ -7,21 +7,20 @@ 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]
-; 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 $[[R1:[0-9]+]], $[[R0]], %lo($JTI0_0)
-; PIC-O32: sll $[[R2:[0-9]+]], ${{[0-9]+}}, 2
-; PIC-O32: addu $[[R3:[0-9]+]], $[[R2]], $[[R1]]
-; PIC-O32: lw $[[R4:[0-9]+]], 0($[[R3]])
+; STATIC-O32: sll $[[R0:[0-9]+]], ${{[0-9]+}}, 2
+; STATIC-O32: lui $[[R1:[0-9]+]], %hi($JTI0_0)
+; STATIC-O32: addu $[[R2:[0-9]+]], $[[R0]], $[[R1]]
+; STATIC-O32: lw $[[R3:[0-9]+]], %lo($JTI0_0)($[[R2]])
+; PIC-O32: sll $[[R0:[0-9]+]], ${{[0-9]+}}, 2
+; PIC-O32: lw $[[R1:[0-9]+]], %got($JTI0_0)
+; PIC-O32: addu $[[R2:[0-9]+]], $[[R0]], $[[R1]]
+; PIC-O32: lw $[[R4:[0-9]+]], %lo($JTI0_0)($[[R2]])
; PIC-O32: addu $[[R5:[0-9]+]], $[[R4:[0-9]+]]
; PIC-O32: jr $[[R5]]
-; PIC-N64: ld $[[R0:[0-9]+]], %got_page($JTI0_0)
-; PIC-N64: daddiu $[[R1:[0-9]+]], $[[R0]], %got_ofst($JTI0_0)
-; PIC-N64: dsll $[[R2:[0-9]+]], ${{[0-9]+}}, 3
-; PIC-N64: daddu $[[R3:[0-9]+]], $[[R2:[0-9]+]], $[[R1]]
-; PIC-N64: ld $[[R4:[0-9]+]], 0($[[R3]])
+; PIC-N64: dsll $[[R0:[0-9]+]], ${{[0-9]+}}, 3
+; PIC-N64: ld $[[R1:[0-9]+]], %got_page($JTI0_0)
+; PIC-N64: daddu $[[R2:[0-9]+]], $[[R0:[0-9]+]], $[[R1]]
+; PIC-N64: ld $[[R4:[0-9]+]], %got_ofst($JTI0_0)($[[R2]])
; PIC-N64: daddu $[[R5:[0-9]+]], $[[R4:[0-9]+]]
; PIC-N64: jr $[[R5]]
switch i32 %0, label %bb4 [
OpenPOWER on IntegriCloud