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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
           Keywords|                            |wrong-code
                 CC|                            |tnfchris at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The error must be for the continuation of 'k' to the scalar loop where we have

  <bb 5> [local count: 829590381]:
  MEM <vector(4) integer(kind=4)> [(integer(kind=4) *)&D.4344] =
vect_vec_iv_.27_95;
  vect_k.32_118 = vect_vec_iv_.27_95 + { 1, 1, 1, 1 };
  k.4_23 = k.4_55 + 1; 
  ivtmp_120 = ivtmp_119 + 1;
  if (ivtmp_120 < bnd.23_89)
    goto <bb 15>; [85.44%]
  else
    goto <bb 18>; [14.56%]

  <bb 18> [local count: 136777259]:
  # k.4_45 = PHI <k.4_23(5)>
  # ivtmp_76 = PHI <ivtmp_14(5)>
  # vect_vec_iv_.27_99 = PHI <vect_vec_iv_.27_95(5)>
  # vect__19.29_108 = PHI <{ 0, 1, 2, 3 }(5)>
  _109 = BIT_FIELD_REF <vect__19.29_108, 32, 96>;
  _48 = _109;
  _100 = BIT_FIELD_REF <vect_vec_iv_.27_99, 32, 0>;
  k.4_43 = _100;
  niters_vector_mult_vf.24_90 = bnd.23_89 << 2;
  tmp.26_93 = 53 - niters_vector_mult_vf.24_90;
  _92 = (integer(kind=4)) niters_vector_mult_vf.24_90;
  tmp.25_91 = _92 + 1;
  if (niters.22_12 == niters_vector_mult_vf.24_90)
    goto <bb 6>; [25.00%]
  else
    goto <bb 22>; [75.00%]

  <bb 22> [local count: 136777259]:
  # k.4_74 = PHI <tmp.25_91(18), k.4_78(23)>
  # ivtmp_77 = PHI <tmp.26_93(18), ivtmp_79(23)>

but I can't really see anything wrong here (besides redundant code).

It's possible to elide the middle loop, but I failed to emulate the
inner loop how it's presented without -fopenmp-simd.

Reply via email to