https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112527

            Bug ID: 112527
           Summary: RVV integer vector instructions generated with
                    rv64gc_zvfh
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rdapp at gcc dot gnu.org
                CC: juzhe.zhong at rivai dot ai, kito.cheng at gmail dot com
  Target Milestone: ---
            Target: riscv

While trying something else I noticed that when compiling without V but with
Zvfh the following FAILs:

/* { dg-do compile } */
/* { dg-additional-options "-std=c99 -march=rv64gc_zvfh -mabi=lp64d
--param=riscv-autovec-preference=scalable -O3" } */

#include <stdint-gcc.h>

#define TEST_TYPE(TYPE)                                 \
  __attribute__((noipa))                                \
  void vadd_##TYPE (TYPE *dst, TYPE *a, TYPE *b, int n) \
  {                                                     \
    for (int i = 0; i < n; i++)                         \
      dst[i] = a[i] + b[i];                             \
  }

TEST_TYPE(int8_t)       \
TEST_TYPE(uint8_t)      \
TEST_TYPE(int16_t)      \
TEST_TYPE(uint16_t)     \
TEST_TYPE(int32_t)      \
TEST_TYPE(uint32_t)     \
TEST_TYPE(int64_t)      \
TEST_TYPE(uint64_t)    \

/* { dg-final { scan-assembler-not {\tvadd\.vv} } } */

Haven't yet checked why, probably just an oversight, but shouldn't be like
that.

Reply via email to