[llvm] r351938 - [ARM] Alter the register allocation order for minsize on Thumb2

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 23 13:53:13 PST 2019


I confirmed this change was responsible and reverted it in r351979.

Here is a mostly reduced reproducer. I think this must be some pre-existing
issue that your change is exercising. My first reduction attempt
overreduced the test case so that clang produced the same backend error
even with r351938 reverted.

On Wed, Jan 23, 2019 at 11:54 AM David Green <David.Green at arm.com> wrote:

> > I suspect that this caused the following build error in Chromium
>
>
> OK, thanks for letting me know! I thought this one would be fairly
> harmless.
>
> Let me know when you have a reproducer.
> Dave
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190123/c3afd6ab/attachment.html>
-------------- next part --------------
typedef __attribute__((neon_vector_type(4))) short b;
typedef __attribute__((neon_vector_type(8))) short c;
typedef __attribute__((neon_vector_type(2))) d;
typedef __attribute__((neon_vector_type(4))) e;
typedef struct {
  c f[2]
} g;
typedef struct {
  e f[2]
} h;
c i(b j, b k) {
  c l = __builtin_shufflevector(j, k, 0, 1, 2, 3, 4, 5, 6, 7);
  return l;
}
b m();
e n(b j, b k) {
  e l = __builtin_neon_vmull_v(j, k, 34);
  return l;
}
g o(c j, c k) {
  g l;
  __builtin_neon_vtrnq_v(&l, j, k, 33);
  return l;
}
g p(e q, e r) {
  c s;
  c u;
  d v;
  g aa;
  e j = q;
  d l = __builtin_shufflevector(j, j, 0, 1);
  {
    e j = r;
    d l = __builtin_shufflevector(j, j, 0, 1);
    v = l;
  }
  {
    b j = l;
    b k = v;
    c l = __builtin_shufflevector(j, k, 0, 1, 2, 3, 4, 5, 6, 7);
    u = l;
  }
  aa.f[0] = u;
  {
    l = __builtin_shufflevector(j, j, 2, 3);
    b j;
    b k = l;
    c l = __builtin_shufflevector(j, k, 0, 1, 2, 3, 4, 5, 6, 7);
    s = l;
  }
  aa.f[1] = s;
  return aa;
}
g ab;
g ac;
e w;
static ad(c *q, c *r, c *ae, c *af, c *ag, c *ah, c *ai, c *aj) {
  h ak;
  e al;
  e am;
  h an;
  e ao;
  e ap;
  h aq;
  e ar;
  e as;
  h at;
  e au;
  e av;
  g aa = ab;
  g aw = o(*ae, *af);
  g ax = o(*ag, *ah);
  g ay = o(*ai, *aj);
  e l;
  av = aa.f[0];
  l = aw.f[0];
  au = l;
  {
    h l;
    __builtin_neon_vtrnq_v(&l, av, au, 34);
    at = l;
  }
  h az = at;
  {
    as = aa.f[1];
    l = aw.f[1];
    ar = l;
    h l;
    __builtin_neon_vtrnq_v(&l, as, ar, 34);
    aq = l;
  }
  h ba = aq;
  {
    ap = ay.f[0];
    ao = ax.f[0];
    h l;
    __builtin_neon_vtrnq_v(&l, ap, ao, 34);
    an = l;
  }
  h bb = an;
  {
    am = ax.f[1];
    h l;
    __builtin_neon_vtrnq_v(&l, am, al, 34);
    ak = l;
  }
  h bc = ak;
  g bd = p(az.f[0], bb.f[0]);
  g be = p(ba.f[0], bc.f[0]);
  g bf = ac;
  g bg = p(ba.f[1], w);
  *q = bd.f[0];
  *r = be.f[0];
  *ag = bd.f[1];
  *ah = be.f[1];
  *ai = bf.f[1];
  *aj = bg.f[1];
}
c bh(e *bi) {
  return i(({ __builtin_neon_vrshrn_n_v(bi[0], 14, 1); }),
           ({ __builtin_neon_vrshrn_n_v(bi[1], 14, 1); }));
}
bj(e *bk, c *bd, c *be) {
  c x;
  e *bi = bk;
  x = i(({ __builtin_neon_vrshrn_n_v(bi[0], 14, 1); }),
        ({ __builtin_neon_vrshrn_n_v(bi[1], 14, 1); }));
  *bd = x;
  *be = bh(bk + 2);
}
static bl(b bm, b bn, c *bo) {
  e y;
  c bp;
  c br;
  c bt;
  c bu;
  b bx;
  c bz[1];
  c ca;
  c cb;
  c cc;
  c cd;
  c ce;
  c cf;
  e bk[8];
  c j = bo[1];
  b l = __builtin_shufflevector(j, j, 0, 1, 2, 3);
  bx = l = __builtin_shufflevector(j, j, 4, 5, 6, 7);
  bk[0] = ({
    b cg = bx;
    b ch = bn;
    n(cg, __builtin_shufflevector(ch, ch, 3, 3, 3, 3));
  });
  bk[1] = ({
    b cg;
    b ch = bn;
    n(cg, __builtin_shufflevector(ch, ch, 3, 3, 3, 3));
  });
  bk[2] = ({
    b cg;
    b ch = bn;
    n(cg, __builtin_shufflevector(ch, ch, 2, 2, 2, 2));
  });
  bk[3] = ({
    b cg;
    b ch;
    e l = __builtin_neon_vmull_v(cg, ch, 34);
    l;
  });
  bk[4] = ({
    b cg;
    b ch = bn;
    n(cg, __builtin_shufflevector(ch, ch, 1, 1, 1, 1));
  });
  bk[5] = ({
    b cg;
    b ch = bn;
    n(cg, __builtin_shufflevector(ch, ch, 1, 1, 1, 1));
  });
  bk[6] = ({
    b cg = bx;
    b ch = bn;
    n(cg, __builtin_shufflevector(ch, ch, 0, 0, 0, 0));
  });
  bk[7] = ({
    b ch;
    n(l, ch);
  });
  bk[2] = ({
    e cg = bk[2];
    b ch;
    b ci = bn;
    cg + n(ch, __builtin_shufflevector(ci, ci, 1, 1, 1, 1));
  });
  bj(bk, &cf, &ce);
  bk[2] = ({
    b cg;
    b ch = bm;
    n(cg, __builtin_shufflevector(ch, ch, 2, 2, 2, 2));
  });
  bk[3] = ({
    b cg;
    b ch = bm;
    n(cg, __builtin_shufflevector(ch, ch, 2, 2, 2, 2));
  });
  bk[6] = ({
    e cg = bk[6];
    b ch;
    b ci = bm;
    cg + n(ch, __builtin_shufflevector(ci, ci, 3, 3, 3, 3));
  });
  bk[7] = ({
    e cg = bk[7];
    b ch;
    b ci = bm;
    cg + n(ch, __builtin_shufflevector(ci, ci, 3, 3, 3, 3));
  });
  bj(bk, bz, &cd);
  bj(&bk[4], &cc, &cb);
  {
    c l = cf + ce;
    bu = l;
    l = cd + cc;
    bt = l;
  }
  bk[3] = ({
    e cg = bk[3];
    b ch;
    b ci = bm;
    cg + n(ch, __builtin_shufflevector(ci, ci, 2, 2, 2, 2));
  });
  bj(bk, &ce, &ca);
  {
    c l = bt + ca;
    br = l;
  }
  bo[1] = br;
  bo[2] = ce;
  {
    c l = cb + bu;
    bp = l;
  }
  bo[3] = bp;
}
static cj(b bm, b bn, c *bo) {
  ad(&bo[0], &bo[1], &bo[2], &bo[3], &bo[4], &bo[5], &bo[6], &bo[7]);
  bl(bm, bn, bo);
}
cl() {
  b bm = m();
  b bn = m();
  c a[1];
  cj(bm, bn, a);
  cj(bm, bn, a);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: idct8x8.sh
Type: text/x-sh
Size: 995 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190123/c3afd6ab/attachment.sh>


More information about the llvm-commits mailing list