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

--- Comment #4 from David Binderman <dcb314 at hotmail dot com> ---
After another 100 minutes or so of reduction, I got this:

int max(int __b) {
  if (0 < __b)
    return __b;
  return 0;
}
struct Plane {
  using T = int;
  Plane(int, int);
  T *Row();
};
using ImageF = Plane;
#pragma GCC target "sse2,ssse3"                                               
\
                   ",avx,avx2"
float *ConvolveXSampleAndTranspose_rowp;
int ConvolveXSampleAndTranspose_res, ConvolveXSampleAndTranspose_r;
void ConvolveXSampleAndTranspose() {
  ImageF out(0, ConvolveXSampleAndTranspose_res);
  for (int y;;) {
    float sum;
    for (int i = ConvolveXSampleAndTranspose_r; i; ++i)
      sum += i;
    for (; ConvolveXSampleAndTranspose_r; ++ConvolveXSampleAndTranspose_r)
      sum +=
          ConvolveXSampleAndTranspose_rowp[max(ConvolveXSampleAndTranspose_r)]
*
          ConvolveXSampleAndTranspose_r;
    out.Row()[y] = sum;
  }
}

$ /home/dcb/gcc/results/bin/g++ -c -w -O3 -march=bdver2   bug825.cc
during GIMPLE pass: vect
bug825.cc: In function ‘void ConvolveXSampleAndTranspose()’:
bug825.cc:16:6: internal compiler error: in vect_do_peeling, at
tree-vect-loop-manip.cc:2703
   16 | void ConvolveXSampleAndTranspose() {
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
0x1396fb1 vect_do_peeling(_loop_vec_info*, tree_node*, tree_node*, tree_node**,
tree_node**, tree_node**, int, bool, bool, tree_node**)
        ../../trunk.git/gcc/tree-vect-loop-manip.cc:2702

I have a bunch of other test cases which demonstrate this bug. I will reduce
the smallest of those.

Reply via email to