public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/98854] [11 Regression] cray benchmark is about 15% slower since r11-4428-g4a369d199bf2f34e Date: Wed, 27 Jan 2021 14:22:35 +0000 [thread overview] Message-ID: <bug-98854-4-dujTOaQ7wI@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98854-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98854 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- Little bit convoluted testcase: double a[1024]; int bar(); void foo (int n) { double x = 0, y = 0; int i = 1023; do { x += a[i] + a[i+1]; y += a[i] / a[i+1]; if (bar ()) break; } while (--i); a[0] = x; a[1] = y; } where we end up with the {x, y} vector CTOR inside the loop (and even spill/reload it because of the call). We have a PHI node-only feed for the vectorized store: t.c:16:8: note: Vectorizing SLP tree: t.c:16:8: note: node 0x3b21ee0 (max_nunits=2, refcnt=1) t.c:16:8: note: op template: a[0] = x_22; t.c:16:8: note: stmt 0 a[0] = x_22; t.c:16:8: note: stmt 1 a[1] = y_21; t.c:16:8: note: children 0x3b21f68 t.c:16:8: note: node 0x3b21f68 (max_nunits=2, refcnt=1) t.c:16:8: note: op template: x_22 = PHI <x_26(9), x_25(10)> t.c:16:8: note: stmt 0 x_22 = PHI <x_26(9), x_25(10)> t.c:16:8: note: stmt 1 y_21 = PHI <y_24(9), y_23(10)> t.c:16:8: note: children 0x3b21ff0 0x3b22210 t.c:16:8: note: node 0x3b21ff0 (max_nunits=2, refcnt=1) t.c:16:8: note: op template: x_26 = PHI <x_14(3)> t.c:16:8: note: stmt 0 x_26 = PHI <x_14(3)> t.c:16:8: note: stmt 1 y_24 = PHI <y_15(3)> t.c:16:8: note: children 0x3b22320 t.c:16:8: note: node (external) 0x3b22320 (max_nunits=1, refcnt=1) t.c:16:8: note: { x_14, y_15 } t.c:16:8: note: node 0x3b22210 (max_nunits=2, refcnt=1) t.c:16:8: note: op template: x_25 = PHI <x_14(4)> t.c:16:8: note: stmt 0 x_25 = PHI <x_14(4)> t.c:16:8: note: stmt 1 y_23 = PHI <y_15(4)> t.c:16:8: note: children 0x3b223a8 t.c:16:8: note: node (external) 0x3b223a8 (max_nunits=1, refcnt=1) t.c:16:8: note: { x_14, y_15 } fixing this issue fixes the slowdown. Testing a patch.
next prev parent reply other threads:[~2021-01-27 14:22 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-27 12:45 [Bug tree-optimization/98854] New: " marxin at gcc dot gnu.org 2021-01-27 12:46 ` [Bug tree-optimization/98854] " marxin at gcc dot gnu.org 2021-01-27 13:13 ` rguenth at gcc dot gnu.org 2021-01-27 13:46 ` rguenth at gcc dot gnu.org 2021-01-27 14:22 ` rguenth at gcc dot gnu.org [this message] 2021-01-27 14:39 ` marxin at gcc dot gnu.org 2021-01-27 14:45 ` rguenther at suse dot de 2021-01-27 14:52 ` marxin at gcc dot gnu.org 2021-01-27 15:17 ` rguenther at suse dot de 2021-01-27 16:33 ` cvs-commit at gcc dot gnu.org 2021-01-27 16:34 ` 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-98854-4-dujTOaQ7wI@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).