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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
For

FAIL: gcc.dg/vect/vect-strided-a-u8-i8-gap7.c execution test

it indeed 'makes combine happy' with enabled vs. disabled diff

***************
*** 912,935 ****
      (plus:QI (reg:QI 264 [ ivtmp.50 ])
          (const_int -3 [0xfffffffffffffffd])))

! Trying 401 -> 186:
  Failed to match this instruction:
  (set (pc)
!     (pc))
! Successfully matched this instruction:
! (set (pc)
!     (label_ref 191))
! allowing combination of insns 401 and 186
! original costs 4 + 4 = 0
! replacement cost 4
! deferring deletion of insn with uid = 401.
! modifying other_insn   187: pc=L191
!       REG_BR_PROB 9996
! deferring rescan insn with uid = 187.

  Trying 193 -> 197:
  Failed to match this instruction:
--- 911,923 ----
      (plus:QI (reg:QI 264 [ ivtmp.50 ])
          (const_int -3 [0xfffffffffffffffd])))

! Trying 186 -> 187:
  Failed to match this instruction:
  (set (pc)
!     (if_then_else (eq (reg/v:QI 255 [ y ])
!             (const_int 0 [0]))
!         (label_ref 191)
!         (pc)))

  Trying 193 -> 197:
  Failed to match this instruction:

where 'y' is unused and has a set to zero.  But this shows an issue with
the testcase which uses uninitialized y to abort(!)

__attribute__ ((noinline)) int
main1 ()
{
  int i;
  s arr[N];
  s *ptr = arr;
  s res[N];
  unsigned char u, t, s, x, y, z, w;

  for (i = 0; i < N; i++)
    {
      arr[i].a = i;
      arr[i].b = i * 2;
      arr[i].c = 17;
      arr[i].d = i+34;
      arr[i].e = i * 3 + 5;
      arr[i].f = i * 5;
      arr[i].g = i - 3;
      arr[i].h = 67;
      if (y) /* Avoid vectorization.  */
        abort ();
    }

probably in the others as well.  I'm going to fix those.

Reply via email to