1 /* { dg-do compile } */
2 /* { dg-options "--param=riscv-autovec-preference=scalable -march=rv32gcv -mabi=ilp32 -fno-tree-vectorize" } */
4 #include "riscv_vector.h"
6 void f (int32_t * restrict in
, int32_t * restrict out
, int32_t * restrict in2
, int32_t * restrict out2
, int n
, int cond
)
10 for (int i
= 0; i
< n
; i
++)
12 out2
[i
] = out
[i
] + in
[i
];
17 for (int i
= 0; i
< n
; i
++)
19 out2
[i
] = out
[i
] + in
[i
];
21 for (int i
= 0; i
< n
; i
++)
23 out
[i
] = out2
[i
] / in
[i
];
25 for (int i
= 0; i
< n
; i
++)
27 out2
[i
] = out
[i
] * in
[i
];
30 for (int i
= 0; i
< n
; i
++)
33 *(vint8mf8_t
*)(out
+ i
+ 10) = v1
;
37 /* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*mf8,\s*t[au],\s*m[au]} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
38 /* { dg-final { scan-assembler-times {vsetvli} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */