summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2014-01-21 21:27:37 +0000
committerAndrew Trick <atrick@apple.com>2014-01-21 21:27:37 +0000
commit10afb02d48116d08e7e9307fe9ad3ada32bece87 (patch)
treefa473015b56cbf73812aac7fdde2695b9e41560b /test
parentce5f07f33c5ee660709cc7a6bc5101f0e25da757 (diff)
downloadllvm-10afb02d48116d08e7e9307fe9ad3ada32bece87.tar.gz
llvm-10afb02d48116d08e7e9307fe9ad3ada32bece87.tar.bz2
llvm-10afb02d48116d08e7e9307fe9ad3ada32bece87.tar.xz
Fix PR18572 - llc crash during GenericScheduler::initPolicy().
Generalized the heuristic that looks at the (very rough) size of the register file before enabling regpressure tracking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Mips/misched-msp430.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/misched-msp430.ll b/test/CodeGen/Mips/misched-msp430.ll
new file mode 100644
index 0000000000..24ca47b2e0
--- /dev/null
+++ b/test/CodeGen/Mips/misched-msp430.ll
@@ -0,0 +1,20 @@
+; RUN: llc < %s -mtriple=msp430-unknown-unknown -enable-misched | FileCheck %s
+
+target datalayout = "e-p:16:16:16-i8:8:8-i16:16:16-i32:16:32-n8:16"
+
+@y = common global i16 0, align 2
+@x = common global i16 0, align 2
+
+; Test that the MI Scheduler's initPolicy does not crash when i32 is
+; unsupported. The content of the asm check below is unimportant. It
+; only verifies that the code generator ran succesfully.
+;
+; CHECK-LABEL: @f
+; CHECK: mov.w &y, &x
+; CHECK: ret
+define void @f() {
+entry:
+ %0 = load i16* @y, align 2
+ store i16 %0, i16* @x, align 2
+ ret void
+}