[AArch64] SVE tests
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / sm3_sm4.c
blobb8981e8e767ac4f7a12ff7b758f7d227cc68e2d8
1 /* { dg-do compile } */
2 /* { dg-options "-march=armv8.4-a+sm4" } */
4 #include "arm_neon.h"
6 uint32x4_t
7 test_vsm3ss1q_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
9 return vsm3ss1q_u32 (a, b, c);
12 /* { dg-final { scan-assembler-times "sm3ss1\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
14 uint32x4_t
15 test_vsm3tt1aq_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
17 return vsm3tt1aq_u32 (a, b, c, 3);
20 /* { dg-final { scan-assembler-times "sm3tt1a\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s\\\[3\\\]" 1 } } */
22 uint32x4_t
23 test_vsm3tt1bq_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
25 return vsm3tt1bq_u32 (a, b, c, 1);
28 /* { dg-final { scan-assembler-times "sm3tt1b\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s\\\[1\\\]" 1 } } */
30 uint32x4_t
31 test_vsm3tt2aq_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
33 return vsm3tt2aq_u32 (a, b, c, 2);
36 /* { dg-final { scan-assembler-times "sm3tt2a\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s\\\[2\\\]" 1 } } */
38 uint32x4_t
39 test_vsm3tt2bq_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
41 return vsm3tt2bq_u32 (a, b, c, 3);
44 /* { dg-final { scan-assembler-times "sm3tt2b\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s\\\[3\\\]" 1 } } */
46 uint32x4_t
47 test_vsm3partw1q_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
49 return vsm3partw1q_u32 (a, b, c);
52 /* { dg-final { scan-assembler-times "sm3partw1\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
54 uint32x4_t
55 test_vsm3partw2q_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
57 return vsm3partw2q_u32 (a, b, c);
60 /* { dg-final { scan-assembler-times "sm3partw2\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
62 // SM4
64 uint32x4_t
65 test_vsm4eq_u32 (uint32x4_t a, uint32x4_t b)
67 return vsm4eq_u32 (a, b);
70 /* { dg-final { scan-assembler-times "sm4e\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
72 uint32x4_t
73 test_vsm4ekeyq_u32 (uint32x4_t a, uint32x4_t b)
75 return vsm4ekeyq_u32 (a, b);
78 /* { dg-final { scan-assembler-times "sm4ekey\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */