public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 21/21] [crypto]: add testcases for Zbkx
@ 2021-10-31  9:48 siyu
  0 siblings, 0 replies; only message in thread
From: siyu @ 2021-10-31  9:48 UTC (permalink / raw)
  To: gcc-patches
  Cc: kito.cheng, jimw, cmuellner, palmer, andrew, lazyparser, jiawei,
	ben.marshall, mjos, Richard.Newell, SiYu Wu

From: SiYu Wu <siyu@isrc.iscas.ac.cn>

---
 gcc/testsuite/gcc.target/riscv/Zbkx.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/riscv/Zbkx.c

diff --git a/gcc/testsuite/gcc.target/riscv/Zbkx.c b/gcc/testsuite/gcc.target/riscv/Zbkx.c
new file mode 100644
index 00000000000..9bd0d6f0dea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/Zbkx.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64i_zbkx -mabi=lp64 -O2" } */
+
+long foo1(long rs1, long rs2)
+{
+    return __builtin_riscv_xperm8(rs1, rs2);
+}
+
+long foo2(long rs1, long rs2)
+{
+    return __builtin_riscv_xperm4(rs1, rs2);
+}
+
+
+
+/* { dg-final { scan-assembler-times "xperm8" 1 } } */
+/* { dg-final { scan-assembler-times "xperm4" 1 } } */
\ No newline at end of file
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-31  9:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-31  9:48 [PATCH 21/21] [crypto]: add testcases for Zbkx siyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).