public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106989] GCC fail to vectorize and clang succeed Date: Wed, 21 Sep 2022 00:42:48 +0000 [thread overview] Message-ID: <bug-106989-4-2H2AP62gO3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106989-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106989 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- /app/example.cpp:20:25: note: Detected interleaving store a[i_27] and a[i_27] /app/example.cpp:20:25: note: Queuing group with duplicate access for fixup /app/example.cpp:20:25: note: zero step in outer loop. /app/example.cpp:20:25: note: zero step in outer loop. /app/example.cpp:20:25: missed: not vectorized: complicated access pattern. /app/example.cpp:22:18: missed: not vectorized: complicated access pattern. /app/example.cpp:20:25: missed: bad data access. ... /app/example.cpp:21:27: note: dependence distance = 0. /app/example.cpp:21:27: note: dependence distance == 0 between b[i_27] and b[i_27] /app/example.cpp:21:27: note: dependence distance = 1. /app/example.cpp:22:18: missed: not vectorized, possible dependence between data-refs a[i_27] and a[_9] /app/example.cpp:21:27: missed: bad data dependence. /app/example.cpp:21:27: note: ***** Analysis failed with vector mode V4SF There is a missing DSE before hand: # VUSE <.MEM_28> _1 = bD.3768[i_27]; # VUSE <.MEM_28> _2 = cD.3769[i_27]; # VUSE <.MEM_28> _3 = dD.3770[i_27]; _4 = _2 * _3; _5 = _1 + _4; # .MEM_19 = VDEF <.MEM_28> aD.3767[i_27] = _5; # VUSE <.MEM_19> _6 = eD.3771[i_27]; _7 = _3 * _6; _8 = _5 + _7; # .MEM_20 = VDEF <.MEM_19> bD.3768[i_27] = _8; # RANGE [irange] int [1, 31999] NONZERO 0x7fff _9 = i_27 + 1; # VUSE <.MEM_20> _10 = aD.3767[_9]; _11 = _3 * _10; _12 = _8 + _11; # .MEM_21 = VDEF <.MEM_20> aD.3767[i_27] = _12; DSE does not notice the store defining MEM_19 does touch the load: # VUSE <.MEM_20> _10 = aD.3767[_9]; And that it is redudent with the store defining MEM_21.
next prev parent reply other threads:[~2022-09-21 0:42 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-20 23:05 [Bug c/106989] New: " juzhe.zhong at rivai dot ai 2022-09-20 23:21 ` [Bug tree-optimization/106989] " pinskia at gcc dot gnu.org 2022-09-20 23:46 ` crazylht at gmail dot com 2022-09-21 0:42 ` pinskia at gcc dot gnu.org [this message] 2022-09-21 0:45 ` pinskia at gcc dot gnu.org 2022-09-21 0:50 ` juzhe.zhong at rivai dot ai 2022-09-21 8:11 ` rguenth at gcc dot gnu.org 2022-09-22 15:56 ` 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-106989-4-2H2AP62gO3@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).