1  /* { dg-do compile } */
       2  /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */
       3  
       4  #include "riscv_vector.h"
       5  
       6  void f0 (void* base1,void* base2,void* out,int n)
       7  {
       8    vfloat32m1_t v = __riscv_vle32_v_f32m1 (base1, 32);
       9    for (int i = 0; i < n; i++){
      10      v = __riscv_vfadd_vv_f32m1 (v, v, 32);
      11      v = __riscv_vle32_v_f32m1_tu (v, base2, 32);
      12    }
      13    __riscv_vse32_v_f32m1 (out, v, 32);
      14  }
      15  
      16  void f1 (void* base1,void* base2,void* out,int n)
      17  {
      18    vfloat32m1_t v = __riscv_vle32_v_f32m1 (base1, 32);
      19    for (int i = 0; i < n; i++){
      20      v = __riscv_vfadd_vf_f32m1 (v, 8.9, 32);
      21      v = __riscv_vle32_v_f32m1_tu (v, base2, 32);
      22    }
      23    __riscv_vse32_v_f32m1 (out, v, 32);
      24  }
      25  
      26  void f2 (void* base1,void* base2,void* out,int n)
      27  {
      28    vfloat32m1_t v = __riscv_vle32_v_f32m1 (base1, 32);
      29    for (int i = 0; i < n; i++){
      30      v = __riscv_vfdiv_vv_f32m1 (v, v, 32);
      31      v = __riscv_vle32_v_f32m1_tu (v, base2, 32);
      32    }
      33    __riscv_vse32_v_f32m1 (out, v, 32);
      34  }
      35  
      36  void f4 (void* base1,void* base2,void* out,int n)
      37  {
      38    vfloat32m1_t v = __riscv_vle32_v_f32m1 (base1, 32);
      39    for (int i = 0; i < n; i++){
      40      v = __riscv_vfdiv_vf_f32m1 (v, 8.9, 32);
      41      v = __riscv_vle32_v_f32m1_tu (v, base2, 32);
      42    }
      43    __riscv_vse32_v_f32m1 (out, v, 32);
      44  }
      45  
      46  void f5 (void* base1,void* base2,void* out,int n)
      47  {
      48    vfloat32m1_t v = __riscv_vle32_v_f32m1 (base1, 32);
      49    for (int i = 0; i < n; i++){
      50      v = __riscv_vfrdiv_vf_f32m1 (v, 8.9, 32);
      51      v = __riscv_vle32_v_f32m1_tu (v, base2, 32);
      52    }
      53    __riscv_vse32_v_f32m1 (out, v, 32);
      54  }
      55  
      56  void f6 (void* base1,void* base2,void* out,int n)
      57  {
      58    vfloat32m1_t v = __riscv_vle32_v_f32m1 (base1, 32);
      59    for (int i = 0; i < n; i++){
      60      v = __riscv_vfsgnj_vv_f32m1 (v, v, 32);
      61      v = __riscv_vle32_v_f32m1_tu (v, base2, 32);
      62    }
      63    __riscv_vse32_v_f32m1 (out, v, 32);
      64  }
      65  
      66  void f7 (void* base1,void* base2,void* out,int n)
      67  {
      68    vfloat32m1_t v = __riscv_vle32_v_f32m1 (base1, 32);
      69    for (int i = 0; i < n; i++){
      70      v = __riscv_vfsgnj_vf_f32m1 (v, 8.9, 32);
      71      v = __riscv_vle32_v_f32m1_tu (v, base2, 32);
      72    }
      73    __riscv_vse32_v_f32m1 (out, v, 32);
      74  }
      75  
      76  void f8 (void* base1,void* base2,void* out,int n)
      77  {
      78    vfloat32m1_t v = __riscv_vle32_v_f32m1 (base1, 32);
      79    for (int i = 0; i < n; i++){
      80      v = __riscv_vfsqrt_v_f32m1 (v, 32);
      81      v = __riscv_vle32_v_f32m1_tu (v, base2, 32);
      82    }
      83    __riscv_vse32_v_f32m1 (out, v, 32);
      84  }
      85  
      86  void f9 (void* base1,void* base2,void* out,int n)
      87  {
      88    vfloat32m1_t v = __riscv_vle32_v_f32m1 (base1, 32);
      89    for (int i = 0; i < n; i++){
      90      v = __riscv_vfrec7_v_f32m1 (v, 32);
      91      v = __riscv_vle32_v_f32m1_tu (v, base2, 32);
      92    }
      93    __riscv_vse32_v_f32m1 (out, v, 32);
      94  }
      95  
      96  void f10 (int8_t* base1,int8_t* base2,int8_t* out,int n)
      97  {
      98    vint8mf4_t v = __riscv_vle8_v_i8mf4 (base1, 32);
      99    vbool32_t m = __riscv_vlm_v_b32 (base1 + 200, 32);
     100    for (int i = 0; i < n; i++){
     101      v = __riscv_vmerge_vxm_i8mf4 (v, 100, m, 32);
     102      v = __riscv_vle8_v_i8mf4_tu (v, base2, 32);
     103    }
     104    __riscv_vse8_v_i8mf4 (out, v, 32);
     105  }
     106  
     107  void f11 (void* base1,void* base2,void* out,int n)
     108  {
     109    vfloat32m1_t v = __riscv_vle32_v_f32m1 (base1, 32);
     110    vbool32_t m = __riscv_vlm_v_b32 (base1 + 200, 32);
     111    for (int i = 0; i < n; i++){
     112      v = __riscv_vfmerge_vfm_f32m1 (v, 8.9, m, 32);
     113      v = __riscv_vle32_v_f32m1_tu (v, base2, 32);
     114    }
     115    __riscv_vse32_v_f32m1 (out, v, 32);
     116  }
     117  
     118  /* { dg-final { scan-assembler-not {vmv1r} } } */