summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/llvm-ir
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/Mips/llvm-ir')
-rw-r--r--llvm/test/CodeGen/Mips/llvm-ir/call.ll22
-rw-r--r--llvm/test/CodeGen/Mips/llvm-ir/indirectbr.ll2
-rw-r--r--llvm/test/CodeGen/Mips/llvm-ir/ret.ll8
3 files changed, 19 insertions, 13 deletions
diff --git a/llvm/test/CodeGen/Mips/llvm-ir/call.ll b/llvm/test/CodeGen/Mips/llvm-ir/call.ll
index da3ffaf64b1..063b7465aed 100644
--- a/llvm/test/CodeGen/Mips/llvm-ir/call.ll
+++ b/llvm/test/CodeGen/Mips/llvm-ir/call.ll
@@ -26,9 +26,10 @@ define i32 @call_void_void() {
; N64: ld $[[TGT:[0-9]+]], %call16(extern_void_void)($gp)
; NOT-R6C: jalr $[[TGT]]
-; R6C: jialc $[[TGT]], 0
+; R6C: jalrc $[[TGT]]
call void @extern_void_void()
+; R6C: jrc $ra
ret i32 0
}
@@ -40,10 +41,11 @@ define i32 @call_i32_void() {
; N64: ld $[[TGT:[0-9]+]], %call16(extern_i32_void)($gp)
; NOT-R6C: jalr $[[TGT]]
-; R6C: jialc $[[TGT]], 0
+; R6C: jalrc $[[TGT]]
%1 = call i32 @extern_i32_void()
%2 = add i32 %1, 1
+; R6C: jrc $ra
ret i32 %2
}
@@ -58,11 +60,12 @@ define float @call_float_void() {
; N64: ld $[[TGT:[0-9]+]], %call16(extern_float_void)($gp)
; NOT-R6C: jalr $[[TGT]]
-; R6C: jialc $[[TGT]], 0
+; R6C: jalrc $[[TGT]]
%1 = call float @extern_float_void()
%2 = fadd float %1, 1.0
+; R6C: jrc $ra
ret float %2
}
@@ -110,10 +113,10 @@ define i32 @indirect_call_void_void(void ()* %addr) {
; ALL: move $25, $4
; NOT-R6C: jalr $25
-; R6C: jialc $25, 0
-
+; R6C: jalrc $25
call void %addr()
+; R6C: jrc $ra
ret i32 0
}
@@ -122,11 +125,12 @@ define i32 @indirect_call_i32_void(i32 ()* %addr) {
; ALL: move $25, $4
; NOT-R6C: jalr $25
-; R6C: jialc $25, 0
+; R6C: jalrc $25
%1 = call i32 %addr()
%2 = add i32 %1, 1
+; R6C: jrc $ra
ret i32 %2
}
@@ -135,11 +139,12 @@ define float @indirect_call_float_void(float ()* %addr) {
; ALL: move $25, $4
; NOT-R6C: jalr $25
-; R6C: jialc $25, 0
+; R6C: jalrc $25
%1 = call float %addr()
%2 = fadd float %1, 1.0
+; R6C: jrc $ra
ret float %2
}
@@ -197,10 +202,11 @@ define i32 @jal_only_allows_symbols() {
; ALL: addiu $[[TGT:[0-9]+]], $zero, 1234
; ALL-NOT: {{jal }}
; NOT-R6C: jalr $[[TGT]]
-; R6C: jialc $[[TGT]], 0
+; R6C: jalrc $[[TGT]]
; ALL-NOT: {{jal }}
call void () inttoptr (i32 1234 to void ()*)()
+; R6C: jrc $ra
ret i32 0
}
diff --git a/llvm/test/CodeGen/Mips/llvm-ir/indirectbr.ll b/llvm/test/CodeGen/Mips/llvm-ir/indirectbr.ll
index 4fdce5a0490..26c02edee51 100644
--- a/llvm/test/CodeGen/Mips/llvm-ir/indirectbr.ll
+++ b/llvm/test/CodeGen/Mips/llvm-ir/indirectbr.ll
@@ -15,7 +15,7 @@
define i32 @br(i8 *%addr) {
; ALL-LABEL: br:
; NOT-R6: jr $4 # <MCInst #{{[0-9]+}} JR
-; R6C: jic $4, 0 # <MCInst #{{[0-9]+}} JIC
+; R6C: jrc $4 # <MCInst #{{[0-9]+}} JIC
; ALL: $BB0_1: # %L1
diff --git a/llvm/test/CodeGen/Mips/llvm-ir/ret.ll b/llvm/test/CodeGen/Mips/llvm-ir/ret.ll
index de104f97551..e2bfd9f6d04 100644
--- a/llvm/test/CodeGen/Mips/llvm-ir/ret.ll
+++ b/llvm/test/CodeGen/Mips/llvm-ir/ret.ll
@@ -31,7 +31,7 @@ define void @ret_void() {
; NOT-R6-DAG: jr $ra # <MCInst #{{[0-9]+}} JR
; R6-DAG: jr $ra # <MCInst #{{[0-9]+}} JALR
-; R6C-DAG: jic $ra, 0 # <MCInst #{{[0-9]+}} JIC
+; R6C-DAG: jrc $ra # <MCInst #{{[0-9]+}} JIC
ret void
}
@@ -181,7 +181,7 @@ define float @ret_float_0x3() {
; NOT-R6-DAG: jr $ra # <MCInst #{{[0-9]+}} JR
; R6-DAG: jr $ra # <MCInst #{{[0-9]+}} JALR
-; R6C-DAG: jic $ra, 0 # <MCInst #{{[0-9]+}} JIC
+; R6C-DAG: jrc $ra # <MCInst #{{[0-9]+}} JIC
; float constants are written as double constants
ret float 0x36b8000000000000
@@ -200,7 +200,7 @@ define double @ret_double_0x0() {
; NOT-R6-DAG: jr $ra # <MCInst #{{[0-9]+}} JR
; R6-DAG: jr $ra # <MCInst #{{[0-9]+}} JALR
-; R6C-DAG: jic $ra, 0 # <MCInst #{{[0-9]+}} JIC
+; R6C-DAG: jrc $ra # <MCInst #{{[0-9]+}} JIC
ret double 0x0000000000000000
}
@@ -214,7 +214,7 @@ define double @ret_double_0x3() {
; NOT-R6-DAG: jr $ra # <MCInst #{{[0-9]+}} JR
; R6-DAG: jr $ra # <MCInst #{{[0-9]+}} JALR
-; R6C-DAG: jic $ra, 0 # <MCInst #{{[0-9]+}} JIC
+; R6C-DAG: jrc $ra # <MCInst #{{[0-9]+}} JIC
ret double 0x0000000000000003
}
OpenPOWER on IntegriCloud