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

Aurelien Jarno <aurelien at aurel32 dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aurelien at aurel32 dot net

--- Comment #6 from Aurelien Jarno <aurelien at aurel32 dot net> ---
Created attachment 66353
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=66353&action=edit
Preprocessed source

Unfortunately, it appears that this changes breaks highway, when built with
-DHWY_CMAKE_RVV:BOOL=OFF (to detect RVV at runtime):

In file included from /home/aurel32/fastp/highway/hwy/highway.h:748,
                 from /home/aurel32/fastp/highway/hwy/per_target.cc:29,
                 from /home/aurel32/fastp/highway/hwy/foreach_target.h:326,
                 from /home/aurel32/fastp/highway/hwy/per_target.cc:28:
/home/aurel32/fastp/highway/hwy/ops/rvv-inl.h: In function 'vuint8mf8_t
hwy::N_RVV::Not(vuint8mf8_t)':
/home/aurel32/fastp/highway/hwy/ops/rvv-inl.h:685:47: error: built-in function
'__riscv_vnot_v_u8mf8' requires the 'v' ISA extension
  685 |     return __riscv_v##OP##_v_##CHAR##SEW##LMUL(v, HWY_RVV_AVL(SEW,
SHIFT)); \
      |           
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/aurel32/fastp/highway/hwy/ops/rvv-inl.h:196:3: note: in expansion of
macro 'HWY_RVV_RETV_ARGV'
  196 |   X_MACRO(BASE, CHAR, 8, 16, __, mf8, mf4, __, -3, /*MLEN=*/64, NAME,
OP)  \
      |   ^~~~~~~
/home/aurel32/fastp/highway/hwy/ops/rvv-inl.h:219:3: note: in expansion of
macro 'HWY_RVV_FOREACH_08_LE2'
  219 |   HWY_RVV_FOREACH_08_LE2(X_MACRO, BASE, CHAR, NAME, OP)       \
      |   ^~~~~~~~~~~~~~~~~~~~~~
/home/aurel32/fastp/highway/hwy/ops/rvv-inl.h:236:3: note: in expansion of
macro 'HWY_RVV_FOREACH_08_EXT'
  236 |   HWY_RVV_FOREACH_08_EXT(X_MACRO, BASE, CHAR, NAME, OP)       \
      |   ^~~~~~~~~~~~~~~~~~~~~~
/home/aurel32/fastp/highway/hwy/base_c.h:220:31: note: in expansion of macro
'HWY_RVV_FOREACH_08_ALL'
  220 | #define HWY_CONCAT_IMPL(a, b) a##b
      |                               ^
/home/aurel32/fastp/highway/hwy/ops/rvv-inl.h:461:3: note: in expansion of
macro 'HWY_RVV_FOREACH_U08'
  461 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ^~~~~~~~~~~~~~~~~~~
/home/aurel32/fastp/highway/hwy/ops/rvv-inl.h:474:3: note: in expansion of
macro 'HWY_RVV_FOREACH_U'
  474 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ^~~~~~~~~~~~~~~~~
/home/aurel32/fastp/highway/hwy/ops/rvv-inl.h:1011:1: note: in expansion of
macro 'HWY_RVV_FOREACH_UI'
 1011 | HWY_RVV_FOREACH_UI(HWY_RVV_RETV_ARGV, Not, not, _ALL)
      | ^~~~~~~~~~~~~~~~~~

highway uses #pragma GCC target "arch=+v" to switch some part of the source to
RVV. It's not yet clear to me where is the issue, but it uses the same strategy
on other architectures.

I have attached the preprocessed code, to be compiled with "g++-16 -std=c++20
-fPIC -fvisibility=hidden -fvisibility-inlines-hidden
-Wno-builtin-macro-redefined  -fmerge-all-constants -Wall -Wextra -Wconversion
-Wsign-conversion -Wvla -Wnon-virtual-dtor -Wcast-align -fmath-errno
-fno-exceptions -Wno-psabi -c per_target.cc.ii".

That said it might be easier to reproduce the issue from the upstream git,
with:
mkdir build
cd build
cmake -DHWY_CMAKE_RVV:BOOL=OFF ..
make -j8

Reply via email to