https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118405
Bug ID: 118405 Summary: [15 regression] RISC-V: ICE in verify_gimple during GIMPLE pass vect Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ewlu at rivosinc dot com Target Milestone: --- Since r15-5559-g7e9b0d90d36, testsuite/gcc.dg/vect/pr82436.c has been failing on trunk for linux rv32 targets with ice ewlu@ewlu:/scratch/ewlu/gcc_stuff/dev/compare/build-ice$ ./build-gcc-linux-stage1/gcc/cc1 ../gcc/gcc/testsuite/gcc.dg/vect/pr82436.c -march=rv32gc -mabi=ilp32d -mcmodel=medlow -fdiagnostics-plain-output -march=rv32gcv_zicsr_zifencei_zaamo_zalrsc -ftree-vectorize -fno-tree-loop-distribute-patterns -fno-vect-cost-model -fno-common -O2 -fdump-tree-vect-details -Ofast -fno-tree-scev-cprop foo Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> {heap 880k} <visibility> {heap 880k} <build_ssa_passes> {heap 880k} <opt_local_passes> {heap 1312k} <remove_symbols> {heap 1716k} <targetclone> {heap 1716k} <free-fnsummary> {heap 1716k} <increase_alignment> {heap 1716k}Streaming LTO <whole-program> {heap 1716k} <profile_estimate> {heap 1716k} <icf> {heap 1716k} <devirt> {heap 1716k} <cp> {heap 1716k} <sra> {heap 1716k} <fnsummary> {heap 1716k} <inline> {heap 1716k} <pure-const> {heap 1716k} <modref> {heap 1716k} <free-fnsummary> {heap 1716k} <static-var> {heap 1716k} <single-use> {heap 1716k} <comdats> {heap 1716k}Assembling functions: foo../gcc/gcc/testsuite/gcc.dg/vect/pr82436.c: In function 'foo': ../gcc/gcc/testsuite/gcc.dg/vect/pr82436.c:20:5: error: invalid non-vector operands to 'minus_expr' vect_tem_61.35_300 = _280 - _289; ../gcc/gcc/testsuite/gcc.dg/vect/pr82436.c:20:5: error: invalid non-vector operands to 'minus_expr' vect_tem_61.35_302 = _286 - _295; ../gcc/gcc/testsuite/gcc.dg/vect/pr82436.c:20:5: error: type mismatch in binary expression vector(1) double vector(1) double double vect__56.36_317 = vect_tem_61.35_300 / _306; ../gcc/gcc/testsuite/gcc.dg/vect/pr82436.c:20:5: error: type mismatch in binary expression vector(1) double vector(1) double double vect__56.36_318 = vect_tem_61.35_300 / _307; ../gcc/gcc/testsuite/gcc.dg/vect/pr82436.c:20:5: error: type mismatch in binary expression vector(1) double vector(1) double double vect__56.36_319 = vect_tem_61.35_302 / _312; ../gcc/gcc/testsuite/gcc.dg/vect/pr82436.c:20:5: error: type mismatch in binary expression vector(1) double vector(1) double double vect__56.36_320 = vect_tem_61.35_302 / _313; during GIMPLE pass: vect dump file: ../gcc/gcc/testsuite/gcc.dg/vect/pr82436.c.180t.vect ../gcc/gcc/testsuite/gcc.dg/vect/pr82436.c:20:5: internal compiler error: verify_gimple failed 0x4404312 internal_error(char const*, ...) ../../../gcc/gcc/diagnostic-global-context.cc:518 0x1bb7161 verify_gimple_in_cfg(function*, bool, bool) ../../../gcc/gcc/tree-cfg.cc:5682 0x19be01f execute_function_todo ../../../gcc/gcc/passes.cc:2102 0x19bcc48 do_per_function ../../../gcc/gcc/passes.cc:1701 0x19be218 execute_todo ../../../gcc/gcc/passes.cc:2156 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. godbolt link: https://godbolt.org/z/x3bEGYvqE rv32 in the case doesn't really matter except that it was hit the memory_access_type == VMAT_STRIDED_SLP codepath. The alignment check prevents vectorizing the single element which causes the type mismatch.