summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/machine-verifier.mir
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/ARM/machine-verifier.mir')
-rw-r--r--llvm/test/CodeGen/ARM/machine-verifier.mir22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/machine-verifier.mir b/llvm/test/CodeGen/ARM/machine-verifier.mir
new file mode 100644
index 00000000000..c5d678c38cf
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/machine-verifier.mir
@@ -0,0 +1,22 @@
+# RUN: not llc -mtriple=thumb -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
+# This test ensures that the MIR parser runs the machine verifier after parsing.
+
+--- |
+
+ define i32 @inc(i32 %a) {
+ entry:
+ ret i32 %a
+ }
+
+...
+---
+name: inc
+tracksRegLiveness: true
+body: |
+ bb.0.entry:
+ ; CHECK: *** Bad machine code: Unsupported register in Thumb1 push/pop ***
+ frame-setup tPUSH 14, $noreg, undef $r12, killed $lr, implicit-def $sp, implicit $sp
+
+ ; CHECK: *** Bad machine code: Non-flag-setting Thumb1 mov is v6-only ***
+ $r2 = tMOVr killed $r6, 14, $noreg
+...
OpenPOWER on IntegriCloud