[NFC][PowerPC] Add a test to check power 10 features.
authorStefan Pintilie <stefanp@ca.ibm.com>
Tue, 18 Oct 2022 13:45:50 +0000 (08:45 -0500)
committerStefan Pintilie <stefanp@ca.ibm.com>
Tue, 18 Oct 2022 14:05:24 +0000 (09:05 -0500)
This patch only adds a single test for Power 10 features.

llvm/test/CodeGen/PowerPC/p10-check-features.ll [new file with mode: 0644]

diff --git a/llvm/test/CodeGen/PowerPC/p10-check-features.ll b/llvm/test/CodeGen/PowerPC/p10-check-features.ll
new file mode 100644 (file)
index 0000000..1fde1ff
--- /dev/null
@@ -0,0 +1,18 @@
+; RUN: llc -mattr=mma,isa-v31-instructions,pcrelative-memops,prefix-instrs,paired-vector-memops,rop-protect,privileged \
+; RUN:   -mtriple=powerpc64le-unknown-unknown -ppc-asm-full-reg-names \
+; RUN:   %s -o - 2>&1 | FileCheck %s
+; RUN: llc -mattr=mma,isa-v31-instructions,pcrelative-memops,prefix-instrs,paired-vector-memops,rop-protect,privileged \
+; RUN:   -mtriple=powerpc64-unknown-unknown -ppc-asm-full-reg-names \
+; RUN:   %s -o - 2>&1 | FileCheck %s
+
+define dso_local signext i32 @f() {
+entry:
+  ret i32 0
+}
+
+; Make sure that all of the features listed are recognized.
+; CHECK-NOT:    is not a recognized feature for this target
+
+; Make sure that the test was actually compiled.
+; CHECK:        li r3, 0
+; CHECK-NEXT:   blr