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

            Bug ID: 113237
           Summary: [14 Regression] ICE verify_ssa failed when building
                    500.perlbench_r since r14-6822-g01f4251b8775c8
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jamborm at gcc dot gnu.org
                CC: tnfchris at gcc dot gnu.org
            Blocks: 26163
  Target Milestone: ---
              Host: x86_64-linux
            Target: x86_64-linux

With a compiler configured with --enable-checking=yes and the following
testcase derived from 500.perlbench_r with -O3 -march=x86-64-v3 I get a
verify_ssa ICE:

$ cat test.c 
long Perl_pp_split_limit;
int Perl_block_gimme();
int Perl_pp_split() {
  char strend;
  long iters;
  int gimme = Perl_block_gimme();
  while (--Perl_pp_split_limit) {
    if (gimme)
      iters++;
    if (strend)
      break;
  }
  if (iters)
    return 0;
}

$ $PREFIX/gcc -O3 -march=x86-64-v3  -S test.c 
test.c: In function ‘Perl_pp_split’:
test.c:3:5: error: definition in block 4 does not dominate use in block 6
    3 | int Perl_pp_split() {
      |     ^~~~~~~~~~~~~
for SSA_NAME: vect_iters_12.12_110 in statement:
vect_iters_12.12_111 = PHI <vect_iters_12.12_110(6)>
PHI argument
vect_iters_12.12_110
for PHI node
vect_iters_12.12_111 = PHI <vect_iters_12.12_110(6)>
during GIMPLE pass: vect
test.c:3:5: internal compiler error: verify_ssa failed
0x129673f verify_ssa(bool, bool)
        /home/mjambor/gcc/mine/src/gcc/tree-ssa.cc:1203
0xf0bcd5 execute_function_todo
        /home/mjambor/gcc/mine/src/gcc/passes.cc:2095
0xf0c13e execute_todo
        /home/mjambor/gcc/mine/src/gcc/passes.cc:2142
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.

I have bisected the failure to r14-6822-g01f4251b8775c8 (middle-end: Support
vectorization of loops with multiple exits).  I have tried if the patch
attached to PR 113137 helps but unfortunately it does not.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

Reply via email to