public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/99593] New: [11 Regression] arm MVE ICE when compiling firefox (skia) since r11-6708
Date: Mon, 15 Mar 2021 09:40:18 +0000	[thread overview]
Message-ID: <bug-99593-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 99593
           Summary: [11 Regression] arm MVE ICE when compiling firefox
                    (skia) since r11-6708
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

typedef __simd64_int16_t e;
typedef __simd64_uint16_t f;
typedef __simd128_int32_t g;
typedef __simd128_float32_t h;
typedef __simd128_uint32_t i;
g j, p;
g k(int l) { return __builtin_neon_vdup_nv4si(l); }
i n(f l) { return (i)__builtin_neon_vmovluv4hi((e)l); }
template <int, typename> struct q;
template <int r, typename aa> q<r, aa> operator<(aa s, q<r, aa> t) {
  return q<r, aa>(s) < t;
}
template <typename ab, typename ac, int r> q<r, ab> ad(const q<r, ac> &);
typedef q<4, int> ae;
template <> class q<4, float> {
public:
  q(h af) : ag(af) {}
  q(float) {}
  static q ah(void *ai) {
    float *l = (float *)ai;
    return __builtin_neon_vld1v4sf(l);
  }
  q operator+(q o) {
    h l = ag, m = o.ag;
    return __builtin_neon_vaddv4sf(l, m);
  }
  q operator*(q) {
    h l = ag, m;
    return __builtin_neon_vmulfv4sf(l, m);
  }
  h ag;
};
template <> class q<4, unsigned short> {
public:
  q(f af) : ag(af) {}
  static q ah(void *ai) {
    unsigned short *l = (unsigned short *)ai;
    return (f)__builtin_neon_vld1v4hi((__builtin_neon_hi *)l);
  }
  void aj() {
    f m = ag;
    __builtin_neon_vst1v4hi(0, (e)m);
  }
  f ag;
};
template <> class q<4, int> {
public:
  q(g af) : ag(af) {}
  q(int u) { ag = k(u); }
  static q ah(void *ai) {
    int *l = (int *)ai;
    return __builtin_neon_vld1v4si(l);
  }
  q operator&(q o) {
    g v = ag & o.ag;
    return v;
  }
  q operator|(q o) {
    g w = ag | o.ag;
    return w;
  }
  q operator^(q) {
    g x = ag ^ p;
    return x;
  }
  q operator>>(int ak) { return ag >> q(ak).ag; }
  q operator<(q) {
    g y, z = j < ag;
    y = (g)z;
    return y;
  }
  g ag;
};
template <> ae ad(const q<4, unsigned short> &al) { return g(n(al.ag)); }
template <> q<4, unsigned short> ad(const ae &al) {
  i l(i(al.ag));
  return (f)__builtin_neon_vmovnv4si((g)l);
}
q<4, float> am(long long an) {
  q ao = q<4, unsigned short>::ah(&an);
  ae ak = ad<int>(ao), ap = ak & 8000, aq = ak ^ ap, ar = 55 < aq, as(aq);
  q at = as & ar;
  ae au = ap | at;
  return q<4, float>::ah(&au);
}
q<4, unsigned short> av(q<4, float> aw) {
  ae ak = ae::ah(&aw), ap = ak & 80000000, aq = ap, ax = 5, as = aq >> 3,
     ay = 6;
  q az = ax & as;
  ae au = ay | az;
  return ad<unsigned short>(au);
}
struct ba {
  typedef int bb;
  static q<4, float> bc(int s) { return am(s); }
};
q<4, float> bd(q<4, float> s) { return s * 0; }
template <typename be> void bf(void *bg, void *al, int bh, int bi) {
  int bj;
  auto bk(static_cast<typename be::bb *>(al) + bh),
      d = static_cast<typename be::bb *>(bg),
      bl = be::bc(static_cast<typename be::bb *>(al)[0]), bm = be::bc(0),
      c = bm;
  for (; bi;) {
    auto a = c, bn = be::bc(static_cast<typename be::bb *>(al)[1]),
         bo = be::bc(1);
    q bp = bn;
    q bq = bp;
    auto b = bq + bo;
    bl = be::bc(static_cast<typename be::bb *>(al)[2]);
    bm = be::bc(bk[2]);
    c = bl + bm;
    q br = a + b;
    auto bs = br;
    q bt = bd(bs);
    av(bt).aj();
    d[0] = bj;
  }
}
int bu;
void bv() { bf<ba>(0, 0, 0, bu); }

reduced from firefox (skia) ICEs with -mtune=generic-armv7-a -mfloat-abi=hard
-mfpu=neon -O2 -std=c++17:
ccLSOUAW.ii: In function ‘void bf(void*, void*, int, int) [with be = ba]’:
ccLSOUAW.ii:119:1: internal compiler error: in neon_output_shift_immediate, at
config/arm/arm.c:12993
  119 | }
      | ^
0x1adad35 neon_output_shift_immediate(char const*, char, rtx_def**,
machine_mode, int, bool)
        ../../gcc/config/arm/arm.c:12993
0x212ff23 output_510
        ../../gcc/config/arm/arm.md:12899
0x111be52 get_insn_template(int, rtx_insn*)
        ../../gcc/final.c:2072
0x111e0c3 final_scan_insn_1
        ../../gcc/final.c:3058
0x111e54b final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
        ../../gcc/final.c:3171
0x111bc83 final_1
        ../../gcc/final.c:2022
0x1121245 rest_of_handle_final
        ../../gcc/final.c:4676
0x11215a4 execute
        ../../gcc/final.c:4754
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

since r11-6708-gbfab355012ca0f5219da8beb04f2fdaf757d34b7

             reply	other threads:[~2021-03-15  9:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15  9:40 jakub at gcc dot gnu.org [this message]
2021-03-15  9:54 ` [Bug target/99593] " jakub at gcc dot gnu.org
2021-03-15 10:00 ` [Bug target/99593] [11 Regression] arm Neon " ktkachov at gcc dot gnu.org
2021-03-15 10:29 ` jakub at gcc dot gnu.org
2021-03-15 13:54 ` clyon at gcc dot gnu.org
2021-03-15 13:59 ` jakub at gcc dot gnu.org
2021-03-15 14:08 ` jakub at gcc dot gnu.org
2021-03-17 17:17 ` clyon at gcc dot gnu.org
2021-03-17 17:21 ` ktkachov at gcc dot gnu.org
2021-03-17 17:23 ` jakub at gcc dot gnu.org
2021-03-17 18:54 ` ktkachov at gcc dot gnu.org
2021-03-17 19:18 ` jakub at gcc dot gnu.org
2021-03-17 19:51 ` clyon at gcc dot gnu.org
2021-03-17 20:11 ` jakub at gcc dot gnu.org
2021-03-18 12:22 ` clyon at gcc dot gnu.org
2021-03-19 12:49 ` cvs-commit at gcc dot gnu.org
2021-03-19 12:50 ` jakub at gcc dot gnu.org
2021-03-19 12:51 ` jakub at gcc dot gnu.org
2021-03-19 12:59 ` clyon at gcc dot gnu.org
2021-03-23 15:30 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99593-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).