(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
sm3_sm4.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-march=armv8.4-a+sm4" } */
       3  
       4  #include "arm_neon.h"
       5  
       6  uint32x4_t
       7  test_vsm3ss1q_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
       8  {
       9    return vsm3ss1q_u32 (a, b, c);
      10  }
      11  
      12  /* { dg-final { scan-assembler-times "sm3ss1\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
      13  
      14  uint32x4_t
      15  test_vsm3tt1aq_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
      16  {
      17    return vsm3tt1aq_u32 (a, b, c, 3);
      18  }
      19  
      20  /* { dg-final { scan-assembler-times "sm3tt1a\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s\\\[3\\\]" 1 } } */
      21  
      22  uint32x4_t
      23  test_vsm3tt1bq_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
      24  {
      25    return vsm3tt1bq_u32 (a, b, c, 1);
      26  }
      27  
      28  /* { dg-final { scan-assembler-times "sm3tt1b\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s\\\[1\\\]" 1 } } */
      29  
      30  uint32x4_t
      31  test_vsm3tt2aq_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
      32  {
      33    return vsm3tt2aq_u32 (a, b, c, 2);
      34  }
      35  
      36  /* { dg-final { scan-assembler-times "sm3tt2a\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s\\\[2\\\]" 1 } } */
      37  
      38  uint32x4_t
      39  test_vsm3tt2bq_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
      40  {
      41    return vsm3tt2bq_u32 (a, b, c, 3);
      42  }
      43  
      44  /* { dg-final { scan-assembler-times "sm3tt2b\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s\\\[3\\\]" 1 } } */
      45  
      46  uint32x4_t
      47  test_vsm3partw1q_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
      48  {
      49    return vsm3partw1q_u32 (a, b, c);
      50  }
      51  
      52  /* { dg-final { scan-assembler-times "sm3partw1\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
      53  
      54  uint32x4_t
      55  test_vsm3partw2q_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
      56  {
      57    return vsm3partw2q_u32 (a, b, c);
      58  }
      59  
      60  /* { dg-final { scan-assembler-times "sm3partw2\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
      61  
      62  // SM4
      63  
      64  uint32x4_t
      65  test_vsm4eq_u32 (uint32x4_t a, uint32x4_t b)
      66  {
      67    return vsm4eq_u32 (a, b);
      68  }
      69  
      70  /* { dg-final { scan-assembler-times "sm4e\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
      71  
      72  uint32x4_t
      73  test_vsm4ekeyq_u32 (uint32x4_t a, uint32x4_t b)
      74  {
      75    return vsm4ekeyq_u32 (a, b);
      76  }
      77  
      78  /* { dg-final { scan-assembler-times "sm4ekey\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */