[Bug tree-optimization/105374] New: [12 Regression] ICE in fold_convert_loc, at fold-const.cc:2580 during GIMPLE pass: reassoc since r12-7338-g884f77b4222289510e1df9db2889b60c5df6fcda

acoplan at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 25 12:08:17 GMT 2022


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

            Bug ID: 105374
           Summary: [12 Regression] ICE in fold_convert_loc, at
                    fold-const.cc:2580 during GIMPLE pass: reassoc since
                    r12-7338-g884f77b4222289510e1df9db2889b60c5df6fcda
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

The following fails:

$ cat t.cc
typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
v4f f_x, f_y;
long f() { return (f_x < f_y | f_x <= f_y)[2]; }
$ ./arm-eabi-gcc -c t.cc -march=armv8.1-m.main+mve -mfloat-abi=hard -O
during GIMPLE pass: reassoc
t.cc: In function 'long int f()':
t.cc:3:6: internal compiler error: in fold_convert_loc, at fold-const.cc:2580
    3 | long f() { return (f_x < f_y | f_x <= f_y)[2]; }
      |      ^
0xcb5136 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        /home/alecop01/toolchain/src/gcc/gcc/fold-const.cc:2580
0x12ef522 eliminate_redundant_comparison
        /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-reassoc.cc:2257
0x12ef522 optimize_ops_list
        /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-reassoc.cc:2448
0x12f5a0b reassociate_bb
        /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-reassoc.cc:6737
0x12f8496 reassociate_bb
        /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-reassoc.cc:6899
0x12f8929 do_reassoc
        /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-reassoc.cc:7011
0x12f8929 execute_reassoc
        /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-reassoc.cc:7100
0x12f8929 execute
        /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-reassoc.cc:7141
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.

Bisection shows the issue started with
r12-7338-g884f77b4222289510e1df9db2889b60c5df6fcda :

commit 884f77b4222289510e1df9db2889b60c5df6fcda
Author: Christophe Lyon <christophe.lyon@arm.com>
Date:   Wed Oct 13 10:16:22 2021

    arm: Implement MVE predicates as vectors of booleans


More information about the Gcc-bugs mailing list