(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
riscv/
rvv/
base/
mov-1.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */
       3  /* { dg-final { check-function-bodies "**" "" } } */
       4  
       5  #include "riscv_vector.h"
       6  
       7  /*
       8  ** mov1:
       9  **	vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*mf8,\s*t[au],\s*m[au]
      10  **	vle8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      11  **	vse8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      12  **  ret
      13  */
      14  void mov1 (int8_t *in, int8_t *out)
      15  {
      16    vint8mf8_t v = *(vint8mf8_t*)in;
      17    *(vint8mf8_t*)out = v;
      18  }
      19  
      20  /*
      21  ** mov2:
      22  **	vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*mf4,\s*t[au],\s*m[au]
      23  **	vle8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      24  **	vse8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      25  **  ret
      26  */
      27  void mov2 (int8_t *in, int8_t *out)
      28  {
      29    vint8mf4_t v = *(vint8mf4_t*)in;
      30    *(vint8mf4_t*)out = v;
      31  }
      32  
      33  /*
      34  ** mov3:
      35  **	vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*mf2,\s*t[au],\s*m[au]
      36  **	vle8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      37  **	vse8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      38  **  ret
      39  */
      40  void mov3 (int8_t *in, int8_t *out)
      41  {
      42    vint8mf2_t v = *(vint8mf2_t*)in;
      43    *(vint8mf2_t*)out = v;
      44  }
      45  
      46  /*
      47  ** mov4:
      48  **	vl1re8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      49  **	vs1r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      50  **  ret
      51  */
      52  void mov4 (int8_t *in, int8_t *out)
      53  {
      54    vint8m1_t v = *(vint8m1_t*)in;
      55    *(vint8m1_t*)out = v;
      56  }
      57  
      58  /*
      59  ** mov5:
      60  **	vl2re8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      61  **	vs2r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      62  **  ret
      63  */
      64  void mov5 (int8_t *in, int8_t *out)
      65  {
      66    vint8m2_t v = *(vint8m2_t*)in;
      67    *(vint8m2_t*)out = v;
      68  }
      69  
      70  /*
      71  ** mov6:
      72  **	vl4re8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      73  **	vs4r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      74  **  ret
      75  */
      76  void mov6 (int8_t *in, int8_t *out)
      77  {
      78    vint8m4_t v = *(vint8m4_t*)in;
      79    *(vint8m4_t*)out = v;
      80  }
      81  
      82  /*
      83  ** mov7:
      84  **	vl8re8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      85  **	vs8r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      86  **  ret
      87  */
      88  void mov7 (int8_t *in, int8_t *out)
      89  {
      90    vint8m8_t v = *(vint8m8_t*)in;
      91    *(vint8m8_t*)out = v;
      92  }
      93  
      94  /*
      95  ** mov8:
      96  **	vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*mf8,\s*t[au],\s*m[au]
      97  **	vle8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      98  **	vse8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
      99  **  ret
     100  */
     101  void mov8 (uint8_t *in, uint8_t *out)
     102  {
     103    vuint8mf8_t v = *(vuint8mf8_t*)in;
     104    *(vuint8mf8_t*)out = v;
     105  }
     106  
     107  /*
     108  ** mov9:
     109  **	vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*mf4,\s*t[au],\s*m[au]
     110  **	vle8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
     111  **	vse8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
     112  **  ret
     113  */
     114  void mov9 (uint8_t *in, uint8_t *out)
     115  {
     116    vuint8mf4_t v = *(vuint8mf4_t*)in;
     117    *(vuint8mf4_t*)out = v;
     118  }
     119  
     120  /*
     121  ** mov10:
     122  **	vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*mf2,\s*t[au],\s*m[au]
     123  **	vle8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
     124  **	vse8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
     125  **  ret
     126  */
     127  void mov10 (uint8_t *in, uint8_t *out)
     128  {
     129    vuint8mf2_t v = *(vuint8mf2_t*)in;
     130    *(vuint8mf2_t*)out = v;
     131  }
     132  
     133  /*
     134  ** mov11:
     135  **	vl1re8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
     136  **	vs1r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
     137  **  ret
     138  */
     139  void mov11 (uint8_t *in, uint8_t *out)
     140  {
     141    vuint8m1_t v = *(vuint8m1_t*)in;
     142    *(vuint8m1_t*)out = v;
     143  }
     144  
     145  /*
     146  ** mov12:
     147  **	vl2re8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
     148  **	vs2r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
     149  **  ret
     150  */
     151  void mov12 (uint8_t *in, uint8_t *out)
     152  {
     153    vuint8m2_t v = *(vuint8m2_t*)in;
     154    *(vuint8m2_t*)out = v;
     155  }
     156  
     157  /*
     158  ** mov13:
     159  **	vl4re8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
     160  **	vs4r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
     161  **  ret
     162  */
     163  void mov13 (uint8_t *in, uint8_t *out)
     164  {
     165    vuint8m4_t v = *(vuint8m4_t*)in;
     166    *(vuint8m4_t*)out = v;
     167  }
     168  
     169  /*
     170  ** mov14:
     171  **	vl8re8\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
     172  **	vs8r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
     173  **  ret
     174  */
     175  void mov14 (uint8_t *in, uint8_t *out)
     176  {
     177    vuint8m8_t v = *(vuint8m8_t*)in;
     178    *(vuint8m8_t*)out = v;
     179  }