summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/dsp_msa_warning.ll
diff options
context:
space:
mode:
authorPetar Jovanovic <petar.jovanovic@mips.com>2018-01-22 16:43:30 +0000
committerPetar Jovanovic <petar.jovanovic@mips.com>2018-01-22 16:43:30 +0000
commit29aced1baed029fa3f68c103ca203546033d0b6f (patch)
tree2e637be04e9bad45390b05bd90663202268f3c17 /llvm/test/CodeGen/Mips/dsp_msa_warning.ll
parentf94c10d91a95b0fe5d529b72280b7f52773ed740 (diff)
downloadbcm5719-llvm-29aced1baed029fa3f68c103ca203546033d0b6f.tar.gz
bcm5719-llvm-29aced1baed029fa3f68c103ca203546033d0b6f.zip
[mips] add warnings for using dsp and msa flags with inappropriate revisions
Dsp and dspr2 require MIPS revision 2, while msa requires revision 5. Adding warnings for cases when these flags are used with earlier revision. Patch by Milos Stojanovic. Differential Revision: https://reviews.llvm.org/D40490 llvm-svn: 323131
Diffstat (limited to 'llvm/test/CodeGen/Mips/dsp_msa_warning.ll')
-rw-r--r--llvm/test/CodeGen/Mips/dsp_msa_warning.ll44
1 files changed, 44 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/dsp_msa_warning.ll b/llvm/test/CodeGen/Mips/dsp_msa_warning.ll
new file mode 100644
index 00000000000..500ca18df60
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/dsp_msa_warning.ll
@@ -0,0 +1,44 @@
+; Check msa warnings.
+; RUN: llc -march=mips -mattr=+mips32r2 -mattr=+msa -mattr=+fp64 < %s 2>&1 | \
+; RUN: FileCheck %s -check-prefix=MSA_32
+; RUN: llc -march=mips64 -mattr=+mips64r2 -mattr=+msa < %s 2>&1 | \
+; RUN: FileCheck %s -check-prefix=MSA_64
+; RUN: llc -march=mips -mattr=+mips32r5 -mattr=+msa -mattr=+fp64 < %s 2>&1 | \
+; RUN: FileCheck %s -check-prefix=MSA_32_NO_WARNING
+; RUN: llc -march=mips64 -mattr=+mips64r5 -mattr=+msa < %s 2>&1 | \
+; RUN: FileCheck %s -check-prefix=MSA_64_NO_WARNING
+
+; Check dspr2 warnings.
+; RUN: llc -march=mips -mattr=+mips32 -mattr=+dspr2 < %s 2>&1 | \
+; RUN: FileCheck %s -check-prefix=DSPR2_32
+; RUN: llc -march=mips64 -mattr=+mips64 -mattr=+dspr2 < %s 2>&1 | \
+; RUN: FileCheck %s -check-prefix=DSPR2_64
+; RUN: llc -march=mips64 -mattr=+mips64r3 -mattr=+dspr2 < %s 2>&1 | \
+; RUN: FileCheck %s -check-prefix=DSPR2_64_NO_WARNING
+; RUN: llc -march=mips -mattr=+mips32r2 -mattr=+dspr2 < %s 2>&1 | \
+; RUN: FileCheck %s -check-prefix=DSPR2_32_NO_WARNING
+
+; Check dsp warnings.
+; RUN: llc -march=mips -mattr=+mips32 -mattr=+dsp < %s 2>&1 | \
+; RUN: FileCheck %s -check-prefix=DSP_32
+; RUN: llc -march=mips64 -mattr=+mips64 -mattr=+dsp < %s 2>&1 | \
+; RUN: FileCheck %s -check-prefix=DSP_64
+; RUN: llc -march=mips -mattr=+mips32r5 -mattr=+dsp < %s 2>&1 | \
+; RUN: FileCheck %s -check-prefix=DSP_32_NO_WARNING
+; RUN: llc -march=mips64 -mattr=+mips64r2 -mattr=+dsp < %s 2>&1 | \
+; RUN: FileCheck %s -check-prefix=DSP_64_NO_WARNING
+
+; MSA_32: warning: the 'msa' ASE requires MIPS32 revision 5 or greater
+; MSA_64: warning: the 'msa' ASE requires MIPS64 revision 5 or greater
+; MSA_32_NO_WARNING-NOT: warning: the 'msa' ASE requires MIPS32 revision 5 or greater
+; MSA_64_NO_WARNING-NOT: warning: the 'msa' ASE requires MIPS64 revision 5 or greater
+
+; DSPR2_32: warning: the 'dspr2' ASE requires MIPS32 revision 2 or greater
+; DSPR2_64: warning: the 'dspr2' ASE requires MIPS64 revision 2 or greater
+; DSPR2_32_NO_WARNING-NOT: warning: the 'dspr2' ASE requires MIPS32 revision 2 or greater
+; DSPR2_64_NO_WARNING-NOT: warning: the 'dspr2' ASE requires MIPS64 revision 2 or greater
+
+; DSP_32: warning: the 'dsp' ASE requires MIPS32 revision 2 or greater
+; DSP_64: warning: the 'dsp' ASE requires MIPS64 revision 2 or greater
+; DSP_32_NO_WARNING-NOT: warning: the 'dsp' ASE requires MIPS32 revision 2 or greater
+; DSP_64_NO_WARNING-NOT: warning: the 'dsp' ASE requires MIPS64 revision 2 or greater
OpenPOWER on IntegriCloud