Beginning of alloca implementation for Mips fast-isel
[oota-llvm.git] / test / CodeGen / Mips / eh-return32.ll
index cf18fde5bdf4b929a60256f767ac2b8e15e3c2ed..748050c4d34b7069d941b79bbca7fce3a46323a8 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: llc -march=mipsel -mcpu=mips32 < %s | FileCheck %s
+; RUN: llc -march=mipsel -mcpu=mips32   -asm-show-inst < %s | FileCheck %s -check-prefix=CHECK -check-prefix=NOT-R6
+; RUN: llc -march=mipsel -mcpu=mips32r2 -asm-show-inst < %s | FileCheck %s -check-prefix=CHECK -check-prefix=NOT-R6
+; RUN: llc -march=mipsel -mcpu=mips32r6 -asm-show-inst < %s | FileCheck %s -check-prefix=CHECK -check-prefix=R6
 
 declare void @llvm.eh.return.i32(i32, i8*)
 declare void @foo(...)
@@ -9,7 +11,7 @@ entry:
   call void @llvm.eh.return.i32(i32 %offset, i8* %handler)
   unreachable
 
-; CHECK:        f1
+; CHECK:    f1:
 ; CHECK:        addiu   $sp, $sp, -[[spoffset:[0-9]+]]
 
 ; check that $a0-$a3 are saved on stack.
@@ -25,10 +27,10 @@ entry:
 ; CHECK:        .cfi_offset 7,
 
 ; check that stack adjustment and handler are put in $v1 and $v0.
-; CHECK:        or      $[[R0:[a-z0-9]+]], $5, $zero
-; CHECK:        or      $[[R1:[a-z0-9]+]], $4, $zero
-; CHECK:        or      $3, $[[R1]], $zero
-; CHECK:        or      $2, $[[R0]], $zero
+; CHECK:        move    $[[R0:[a-z0-9]+]], $5
+; CHECK:        move    $[[R1:[a-z0-9]+]], $4
+; CHECK:        move    $3, $[[R1]]
+; CHECK:        move    $2, $[[R0]]
 
 ; check that $a0-$a3 are restored from stack.
 ; CHECK:        lw      $4, [[offset0]]($sp)
@@ -37,9 +39,12 @@ entry:
 ; CHECK:        lw      $7, [[offset3]]($sp)
 
 ; check that stack is adjusted by $v1 and that code returns to address in $v0
+; also check that $25 contains handler value
 ; CHECK:        addiu   $sp, $sp, [[spoffset]]
-; CHECK:        or      $ra, $2, $zero
-; CHECK:        jr      $ra
+; CHECK:        move    $25, $2
+; CHECK:        move    $ra, $2
+; NOT-R6:       jr      $ra # <MCInst #{{[0-9]+}} JR
+; R6:           jr      $ra # <MCInst #{{[0-9]+}} JALR
 ; CHECK:        addu    $sp, $sp, $3
 }
 
@@ -48,7 +53,7 @@ entry:
   call void @llvm.eh.return.i32(i32 %offset, i8* %handler)
   unreachable
 
-; CHECK:        f2
+; CHECK:    f2:
 ; CHECK:        addiu   $sp, $sp, -[[spoffset:[0-9]+]]
 
 ; check that $a0-$a3 are saved on stack.
@@ -64,8 +69,8 @@ entry:
 ; CHECK:        .cfi_offset 7,
 
 ; check that stack adjustment and handler are put in $v1 and $v0.
-; CHECK:        or      $3, $4, $zero
-; CHECK:        or      $2, $5, $zero
+; CHECK:        move    $3, $4
+; CHECK:        move    $2, $5
 
 ; check that $a0-$a3 are restored from stack.
 ; CHECK:        lw      $4, [[offset0]]($sp)
@@ -74,8 +79,11 @@ entry:
 ; CHECK:        lw      $7, [[offset3]]($sp)
 
 ; check that stack is adjusted by $v1 and that code returns to address in $v0
+; also check that $25 contains handler value
 ; CHECK:        addiu   $sp, $sp, [[spoffset]]
-; CHECK:        or      $ra, $2, $zero
-; CHECK:        jr      $ra
+; CHECK:        move    $25, $2
+; CHECK:        move    $ra, $2
+; NOT-R6:       jr      $ra # <MCInst #{{[0-9]+}} JR
+; R6:           jr      $ra # <MCInst #{{[0-9]+}} JALR
 ; CHECK:        addu    $sp, $sp, $3
 }