Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/base/pr112431-38.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv -mabi=lp64d -O3" } */
3
4 #include "riscv_vector.h"
5
6 void
7 foo (void *in, void *out)
8 {
9 vfloat64m2_t accum = __riscv_vle64_v_f64m2 (in, 4);
10 vfloat64m1_t high_eew64 = __riscv_vget_v_f64m2_f64m1 (accum, 1);
11 vint64m1_t high_eew64_i = __riscv_vreinterpret_v_f64m1_i64m1 (high_eew64);
12 vint32m1_t high_eew32_i = __riscv_vreinterpret_v_i64m1_i32m1 (high_eew64_i);
13 vfloat32m1_t high_eew32 = __riscv_vreinterpret_v_i32m1_f32m1 (high_eew32_i);
14 vfloat64m2_t result = __riscv_vfwmacc_vf_f64m2 (accum, 64, high_eew32, 4);
15 __riscv_vse64_v_f64m2 (out, result, 4);
16 }
17
18 void
19 foo2 (void *in, void *out)
20 {
21 vfloat64m4_t accum = __riscv_vle64_v_f64m4 (in, 4);
22 vfloat64m2_t high_eew64 = __riscv_vget_v_f64m4_f64m2 (accum, 1);
23 vint64m2_t high_eew64_i = __riscv_vreinterpret_v_f64m2_i64m2 (high_eew64);
24 vint32m2_t high_eew32_i = __riscv_vreinterpret_v_i64m2_i32m2 (high_eew64_i);
25 vfloat32m2_t high_eew32 = __riscv_vreinterpret_v_i32m2_f32m2 (high_eew32_i);
26 vfloat64m4_t result = __riscv_vfwmacc_vf_f64m4 (accum, 64, high_eew32, 4);
27 __riscv_vse64_v_f64m4 (out, result, 4);
28 }
29
30 void
31 foo3 (void *in, void *out)
32 {
33 vfloat64m8_t accum = __riscv_vle64_v_f64m8 (in, 4);
34 vfloat64m4_t high_eew64 = __riscv_vget_v_f64m8_f64m4 (accum, 1);
35 vint64m4_t high_eew64_i = __riscv_vreinterpret_v_f64m4_i64m4 (high_eew64);
36 vint32m4_t high_eew32_i = __riscv_vreinterpret_v_i64m4_i32m4 (high_eew64_i);
37 vfloat32m4_t high_eew32 = __riscv_vreinterpret_v_i32m4_f32m4 (high_eew32_i);
38 vfloat64m8_t result = __riscv_vfwmacc_vf_f64m8 (accum, 64, high_eew32, 4);
39 __riscv_vse64_v_f64m8 (out, result, 4);
40 }
41
42 void
43 foo4 (void *in, void *out)
44 {
45 vfloat64m2_t accum = __riscv_vle64_v_f64m2 (in, 4);
46 vfloat64m1_t high_eew64 = __riscv_vget_v_f64m2_f64m1 (accum, 1);
47 vint64m1_t high_eew64_i = __riscv_vreinterpret_v_f64m1_i64m1 (high_eew64);
48 vint32m1_t high_eew32_i = __riscv_vreinterpret_v_i64m1_i32m1 (high_eew64_i);
49 vfloat32m1_t high_eew32 = __riscv_vreinterpret_v_i32m1_f32m1 (high_eew32_i);
50 vfloat64m2_t result = __riscv_vfwnmsac_vf_f64m2 (accum, 64, high_eew32, 4);
51 __riscv_vse64_v_f64m2 (out, result, 4);
52 }
53
54 void
55 foo5 (void *in, void *out)
56 {
57 vfloat64m4_t accum = __riscv_vle64_v_f64m4 (in, 4);
58 vfloat64m2_t high_eew64 = __riscv_vget_v_f64m4_f64m2 (accum, 1);
59 vint64m2_t high_eew64_i = __riscv_vreinterpret_v_f64m2_i64m2 (high_eew64);
60 vint32m2_t high_eew32_i = __riscv_vreinterpret_v_i64m2_i32m2 (high_eew64_i);
61 vfloat32m2_t high_eew32 = __riscv_vreinterpret_v_i32m2_f32m2 (high_eew32_i);
62 vfloat64m4_t result = __riscv_vfwnmsac_vf_f64m4 (accum, 64, high_eew32, 4);
63 __riscv_vse64_v_f64m4 (out, result, 4);
64 }
65
66 void
67 foo6 (void *in, void *out)
68 {
69 vfloat64m8_t accum = __riscv_vle64_v_f64m8 (in, 4);
70 vfloat64m4_t high_eew64 = __riscv_vget_v_f64m8_f64m4 (accum, 1);
71 vint64m4_t high_eew64_i = __riscv_vreinterpret_v_f64m4_i64m4 (high_eew64);
72 vint32m4_t high_eew32_i = __riscv_vreinterpret_v_i64m4_i32m4 (high_eew64_i);
73 vfloat32m4_t high_eew32 = __riscv_vreinterpret_v_i32m4_f32m4 (high_eew32_i);
74 vfloat64m8_t result = __riscv_vfwnmsac_vf_f64m8 (accum, 64, high_eew32, 4);
75 __riscv_vse64_v_f64m8 (out, result, 4);
76 }
77
78 /* { dg-final { scan-assembler-not {vmv1r} { xfail riscv*-*-* } } } */
79 /* { dg-final { scan-assembler-not {vmv2r} { xfail riscv*-*-* } } } */
80 /* { dg-final { scan-assembler-not {vmv4r} { xfail riscv*-*-* } } } */
81 /* { dg-final { scan-assembler-not {vmv8r} { xfail riscv*-*-* } } } */
82 /* { dg-final { scan-assembler-not {csrr} } } */