summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/micromips-directives.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/Mips/micromips-directives.ll')
-rw-r--r--llvm/test/CodeGen/Mips/micromips-directives.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/micromips-directives.ll b/llvm/test/CodeGen/Mips/micromips-directives.ll
new file mode 100644
index 00000000000..dd0bd5836d2
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/micromips-directives.ll
@@ -0,0 +1,16 @@
+; This test checks if the '.set [no]micromips' directives
+; are emitted before a function's entry label.
+
+; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | \
+; RUN: FileCheck %s -check-prefix=CHECK-MM
+; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=-micromips %s -o - | \
+; RUN: FileCheck %s -check-prefix=CHECK-NO-MM
+
+define i32 @main() nounwind {
+entry:
+ ret i32 0
+}
+
+; CHECK-MM: .set micromips
+; CHECK-NO-MM: .set nomicromips
+; CHECK: main:
OpenPOWER on IntegriCloud