https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118026
Bug ID: 118026 Summary: RISC-V Vector Intrinsic "__riscv_vfwadd_wv_f64m2_tu" generates redundant vmv instructions Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: liutong2020 at iscas dot ac.cn Target Milestone: --- g++ -v info: Using built-in specs. COLLECT_GCC=/wafer/share/gcc-1420/bin/riscv64-unknown-linux-gnu-g++ COLLECT_LTO_WRAPPER=/wafer/share/gcc-1420/libexec/gcc/riscv64-unknown-linux-gnu/14.2.0/lto-wrapper Target: riscv64-unknown-linux-gnu Configured with: /wafer/hanliutong/tools/riscv-gnu-toolchain/gcc/configure --target=riscv64-unknown-linux-gnu --prefix=/wafer/share/gcc-1420 --with-sysroot=/wafer/share/gcc-1420/sysroot --with-pkgversion=g04696df0963 --with-system-zlib --enable-shared --enable-tls --enable-languages=c,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libsanitizer --disable-nls --disable-bootstrap --src=.././gcc --disable-multilib --with-abi=lp64d --with-arch=rv64imafdc --with-tune=rocket --with-isa-spec=20191213 'CFLAGS_FOR_TARGET=-O2 -mcmodel=medlow' 'CXXFLAGS_FOR_TARGET=-O2 -mcmodel=medlow' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.2.0 (g04696df0963) $ riscv64-unknown-linux-gnu-g++ -march=rv64gcv -O3 <foo.cpp> source file: https://godbolt.org/z/a6qsorrfn expected behavior: No redundant "vmv" instruction generation, like clang actual behavior: Generated redundant "vmv" instructions in 38 lines(vmv2r.v v4,v2)