summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2019-11-13 12:08:38 +0300
committerSimon Atanasyan <simon@atanasyan.com>2019-11-13 13:32:39 +0300
commit068db2ed4d1879e100fb12f2a3d75e38b8867b46 (patch)
tree4eb7a0caba5fe7a57010141f0a4c2e5e83b44585 /llvm/test/CodeGen
parentb3853d852629d1a2713cf47a2422c46c0c630f87 (diff)
downloadbcm5719-llvm-068db2ed4d1879e100fb12f2a3d75e38b8867b46.tar.gz
bcm5719-llvm-068db2ed4d1879e100fb12f2a3d75e38b8867b46.zip
[mips] Show an error if 64-bit target triple provided with 32-bit CPU
When a 64-bit triple is used emit an error if the CPU only supports 32-bit code. Patch by Miloš Stojanović. Differential Revision: https://reviews.llvm.org/D70018
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/Mips/cpus-no-mips64.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/cpus-no-mips64.ll b/llvm/test/CodeGen/Mips/cpus-no-mips64.ll
new file mode 100644
index 00000000000..301f6c2152e
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/cpus-no-mips64.ll
@@ -0,0 +1,16 @@
+; Check that we reject 64-bit mode on 32-bit only CPUs.
+
+; RUN: not llc < %s -o /dev/null -mtriple=mips64 -mcpu=mips1 2>&1 | FileCheck %s
+; RUN: not llc < %s -o /dev/null -mtriple=mips64 -mcpu=mips2 2>&1 | FileCheck %s
+
+; RUN: not llc < %s -o /dev/null -mtriple=mips64 -mcpu=mips32 2>&1 | FileCheck %s
+; RUN: not llc < %s -o /dev/null -mtriple=mips64 -mcpu=mips32r2 2>&1 | FileCheck %s
+; RUN: not llc < %s -o /dev/null -mtriple=mips64 -mcpu=mips32r3 2>&1 | FileCheck %s
+; RUN: not llc < %s -o /dev/null -mtriple=mips64 -mcpu=mips32r5 2>&1 | FileCheck %s
+; RUN: not llc < %s -o /dev/null -mtriple=mips64 -mcpu=mips32r6 2>&1 | FileCheck %s
+
+; CHECK: LLVM ERROR: 64-bit code requested on a subtarget that doesn't support it!
+
+define void @foo() {
+ ret void
+}
OpenPOWER on IntegriCloud