public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114172] New: ICE with riscv rvv VSETVL intrinsic
@ 2024-02-29 15:55 vogelm at buerokommunikation dot fernuni-hagen.de
  2024-03-04 10:50 ` [Bug target/114172] [13 only] " bruce at hoult dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: vogelm at buerokommunikation dot fernuni-hagen.de @ 2024-02-29 15:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114172
           Summary: ICE with riscv rvv VSETVL intrinsic
           Product: gcc
           Version: 13.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vogelm at buerokommunikation dot fernuni-hagen.de
  Target Milestone: ---

Created attachment 57576
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57576&action=edit
.i file generated from code in description

#pragma riscv intrinsic "vector"

void saxpy_rvv_m8(float *y, long vl)
{
    for (;;)
    {
        vl = __riscv_vsetvl_e32m8(vl); //ICE
        vfloat32m8_t y_vec;
        __riscv_vse32_v_f32m8(y, y_vec, vl);
    }
}

Description: 
The attached code snipped causes an ICE on about 4 out of 10 attempts on my
local machine. It seems to be related to the RVV intrinsic call
__riscv_vsetvl_e32m8(vl) on line 7.
Passing vl as a parameter here is a programming error, but I don't think the
compiler should crash. 
The behavior can also be observed on godbolt (https://godbolt.org/z/Gr915shzq).
I can reproduce the error on gcc 13.2.0 and 13.1.0.
gcc 14.0.1 doesn't crash so there already seems to be a fix for it but I
couldn't find any bug reports about it.

the exact version of GCC:
    gcc version 13.2.0 (gc891d8dc23e) 

the system type:
    riscv64-unknown-linux-gnu

the options given when GCC was configured/built;
    Configured with: $home/riscv-gnu-toolchain/gcc/configure 
        --target=riscv64-unknown-linux-gnu 
        --prefix=$home/riscv-gnu-toolchain/../_install 
        --with-sysroot=$home/riscv-gnu-toolchain/../_install/sysroot 
        --with-pkgversion=gc891d8dc23e 
        --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 
        --enable-multilib 
        --with-abi=lp64d 
        --with-arch=rv64imafdcv 
        --with-tune=rocket 
        --with-isa-spec=20191213 'CFLAGS_FOR_TARGET=-O2    -mcmodel=medlow'
'CXXFLAGS_FOR_TARGET=-O2    -mcmodel=medlow'

the complete command line that triggers the bug;
    riscv64-unknown-linux-gnu-gcc -march=rv64imafdcv -mabi=lp64d -O3 -static -c
saxpy.c -o saxpy

the compiler output (error messages, warnings, etc.)
    riscv64-unknown-linux-gnu-gcc: internal compiler error: Segmentation fault
signal terminated program cc1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-24 13:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 15:55 [Bug target/114172] New: ICE with riscv rvv VSETVL intrinsic vogelm at buerokommunikation dot fernuni-hagen.de
2024-03-04 10:50 ` [Bug target/114172] [13 only] " bruce at hoult dot org
2024-03-29  2:05 ` wojciech_mula at poczta dot onet.pl
2024-04-24 13:13 ` [Bug target/114172] [13 only] RISC-V: " cvs-commit at gcc dot gnu.org
2024-04-24 13:19 ` kito at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).