summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips/llvm-ir/call.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Mips/llvm-ir/call.ll')
-rw-r--r--test/CodeGen/Mips/llvm-ir/call.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/llvm-ir/call.ll b/test/CodeGen/Mips/llvm-ir/call.ll
index 22a44da..a4b0340 100644
--- a/test/CodeGen/Mips/llvm-ir/call.ll
+++ b/test/CodeGen/Mips/llvm-ir/call.ll
@@ -182,3 +182,18 @@ define hidden void @thunk_undef_double(i32 %this, double %volume) unnamed_addr a
tail call void @undef_double(i32 undef, double undef) #8
ret void
}
+
+; Check that immediate addresses do not use jal.
+define i32 @jal_only_allows_symbols() {
+; ALL-LABEL: jal_only_allows_symbols:
+
+; ALL-NOT: {{jal }}
+; ALL: addiu $[[TGT:[0-9]+]], $zero, 1234
+; ALL-NOT: {{jal }}
+; ALL: jalr $[[TGT]]
+; ALL-NOT: {{jal }}
+
+ call void () inttoptr (i32 1234 to void ()*)()
+ ret i32 0
+}
+
OpenPOWER on IntegriCloud