public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101944] suboptimal SLP for reduced case from namd_r Date: Tue, 17 Aug 2021 11:24:11 +0000 [thread overview] Message-ID: <bug-101944-4-L8a2SfYOfw@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101944-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101944 --- Comment #5 from Kewen Lin <linkw at gcc dot gnu.org> --- (In reply to Richard Biener from comment #3) > On x86 we even have > > Vector cost: 136 > Scalar cost: 196 > > note that we seem to vectorize the reduction but that only happens with > -ffast-math, not -O2 -ftree-slp-vectorize? > I don't quite follow this question, may misunderstand it. Yes, -ffast-math is required, now -O2 doesn't implicitly enable vectorization, it needs the explicit slp option. > One issue is the association of > > (diffa * vdw_d * (1 / 6.) + vdw_c * (1 / 4.)) * diffa + vdw_b * (1 / 2.)) * > diffa + vdw_a > > which we fail to reduce as > > diffa*diffa*diffa*(1/6.)*vdw_d + diffa*diffa*(1/4.)*vdw_c + > diffa*(1/2.)*vdw_b + 1.0*vdw_a Good point!
next prev parent reply other threads:[~2021-08-17 11:24 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-17 9:26 [Bug tree-optimization/101944] New: " linkw at gcc dot gnu.org 2021-08-17 9:29 ` [Bug tree-optimization/101944] " linkw at gcc dot gnu.org 2021-08-17 9:47 ` linkw at gcc dot gnu.org 2021-08-17 10:10 ` rguenth at gcc dot gnu.org 2021-08-17 10:12 ` rguenth at gcc dot gnu.org 2021-08-17 11:24 ` linkw at gcc dot gnu.org [this message] 2022-03-08 8:00 ` pinskia 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-101944-4-L8a2SfYOfw@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).