1  /* { dg-do compile } */
       2  /* { dg-options "-march=rv32gcv -mabi=ilp32 -O3 -fno-tree-vectorize" } */
       3  
       4  #include "riscv_vector.h"
       5  
       6  void fn3 (void);
       7  
       8  void f6 (int8_t * restrict in, int8_t * restrict out, int n)
       9  {
      10    for (int i = 0 ; i < n * n * n * n; i++) {
      11      vfloat32mf2_t v = *(vfloat32mf2_t*)(in + 900 + i);
      12      *(vfloat32mf2_t*)(out + 900 + i) = v;
      13    }
      14    fn3 ();
      15    
      16    for (int i = 0 ; i < n * n * n * n; i++) {
      17      vfloat32mf2_t v = *(vfloat32mf2_t*)(in + 900 + i);
      18      *(vfloat32mf2_t*)(out + 900 + i) = v;
      19    }
      20    fn3 ();
      21    
      22    for (int i = 0 ; i < n * n * n * n; i++) {
      23      vfloat32mf2_t v = *(vfloat32mf2_t*)(in + 900 + i);
      24      *(vfloat32mf2_t*)(out + 900 + i) = v;
      25    }
      26    fn3 ();
      27    for (int i = 0 ; i < n * n * n * n; i++) {
      28      vfloat32mf2_t v = *(vfloat32mf2_t*)(in + 900 + i);
      29      *(vfloat32mf2_t*)(out + 900 + i) = v;
      30    }
      31    fn3 ();
      32    for (int i = 0 ; i < n * n * n * n; i++) {
      33      vfloat32mf2_t v = *(vfloat32mf2_t*)(in + 900 + i);
      34      *(vfloat32mf2_t*)(out + 900 + i) = v;
      35    }
      36  }
      37  
      38  /* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e32,\s*mf2,\s*t[au],\s*m[au]} 5 { target { no-opts "-O0"  no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
      39  /* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e32,\s*mf2,\s*t[au],\s*m[au]\s+\.L[0-9]\:\s+vle32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)} 5 { target { no-opts "-O0"  no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */