public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "zhendong.su at inf dot ethz.ch" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97821] New: wrong code with -ftree-vectorize at -O1 on x86_64-pc-linux-gnu Date: Fri, 13 Nov 2020 22:17:21 +0000 [thread overview] Message-ID: <bug-97821-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97821 Bug ID: 97821 Summary: wrong code with -ftree-vectorize at -O1 on x86_64-pc-linux-gnu Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- The code is valid, but it is hard to reduce, so still quite large. [509] % gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++ --disable-werror --enable-multilib --with-system-zlib Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20201113 (experimental) [master revision 54896b10dbe:c3a97a9df4b:a514934a0565255276adaa4fbd4aa35579ec33c6] (GCC) [510] % [510] % gcctk -O1 small.c; ./a.out 00005030-170 [511] % gcctk -O1 -ftree-vectorize small.c; ./a.out 00005030-176 [512] % [512] % cat small.c int printf (const char *, ...); static unsigned a, f, v; int b, h, aa, ab, ac, ad, ae, y, z, af; static long c, m, t, ag, ah = 3; static signed d; static char e, ai; static short g, j = 1, o, w; int *i, *s; long long l; static int *n; char p; static int q; static int r; static int u; short x; long long *aj = &l; static signed ak; static volatile unsigned al = 5; static volatile short am = 1; int *an(int *ao, int *ap) { return ap; } static int aq() { int ar[] = {2, 2, 2, 2, 2, 2}; short *as = &x; int at[] = {0, 1, 0, 1}; int au = ab = 0; for (; m <= 1; m++) { int av = 0, k, aw = e && u, ax = aw || ag; int **ay = &n; for (; ab; ab++) ac = 0; for (; ac; ac++) am; u &&am; short az = am || a ^ w; unsigned bc = am & w | am || ag; ba: aw = u; i = 0; for (; i; i++) b = a; printf("0"); if (p) { printf("%ld", ag); continue; } if (ag) { printf("7"); e = w | ag<e> c < ax; } if (w) { printf("%d", u); goto bb; } if (u) printf("%d", e); s = &k; u = aw; t = 0; for (; t <= 1; t++) *ay = an(&au, &av); e++; } for (; r >= 0;) for (; ag <= 5;) { signed bd[6]; int be = 0, bf = am % al; for (; be < 6; be++) bd[0] = 9; h = 0; for (; h <= 5; h++) *aj = *as = aa; for (; w; w = d) ; short bg = d + j ^ e + r; al % am; int bi = bg & al >> am; am ^ al; am / al; am &al; al; am / al; if (c) if (q) { be = 0; for (; be; be++) z = 0; } am; int bj = 0; if (m || q) { bh: l = ad = c; int bm = al || q; al; al; char bn = al || q; al; al; bm = q; ae = a; bk: ai = h || q > d; ag = d; al; al; printf("%d", q); if (a > 1) break; if (q) printf("%d", d); if (q) { printf("3"); h = d | bm > q; goto bk; } if (!ai || al && 0) { printf("%d", d); al; printf("%d", a); goto bb; } d = al; printf("%lld", l); m = q; if (ak) { printf("%ld", c); ad = c & q; } if (!ah) { printf("%d", q); goto bh; } } if (c) s = &bj; m = q = d && c; r = ~(e / j & al > r); f |= d = al; v |= am; al / al ^ am; ak = am + al | al; am / al + al ^ am; j = am; al; bb: if (c) g++; a = q || e & d; am || al; am; am; am; al &am; am; am; bl: am; if (q) { printf("%d", q); a = q - am; goto bl; } am; printf("%d", d); m = q & am; am; printf("%d", a); if (d < -41) { printf("%ld", ag); goto ba; } h = *n; printf("3"); c = e / d; printf("%ld", m); d = d << q / ag; o = 2; for (; o; o++) i = &be; x = m = e; printf("%d", r) && (ah = r) || (d = ak && e); printf("%d", ak); if (!bf) { printf("%d", e); *as = a; i = n; bi = ak / am > r; *n = 0; for (; n; n++) ; } y = bi; } return 0; } int main() { for (; af < 6; af++) { d = 8; aq(); } printf("%d\n", h); return 0; }
next reply other threads:[~2020-11-13 22:17 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-13 22:17 zhendong.su at inf dot ethz.ch [this message] 2020-11-14 18:47 ` [Bug tree-optimization/97821] [8/9/10/11 Regression] wrong code with -ftree-vectorize at -O1 on x86_64-pc-linux-gnu by r6-3608 hjl.tools at gmail dot com 2020-11-16 10:26 ` rguenth at gcc dot gnu.org 2020-11-16 10:48 ` rguenth at gcc dot gnu.org 2021-02-03 16:25 ` jakub at gcc dot gnu.org 2021-02-04 9:02 ` rguenth at gcc dot gnu.org 2021-05-14 9:54 ` [Bug tree-optimization/97821] [9/10/11/12 " jakub at gcc dot gnu.org 2021-06-01 8:18 ` rguenth at gcc dot gnu.org 2021-11-09 7:53 ` pinskia at gcc dot gnu.org 2022-01-31 13:09 ` rguenth at gcc dot gnu.org 2022-01-31 14:35 ` rguenth at gcc dot gnu.org 2022-02-01 15:22 ` rguenth at gcc dot gnu.org 2022-02-01 15:47 ` rguenth at gcc dot gnu.org 2022-02-02 9:00 ` rguenth 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-97821-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: linkBe 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).