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/110428] New: missed CSE with VLA vectors Date: Tue, 27 Jun 2023 08:37:29 +0000 [thread overview] Message-ID: <bug-110428-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110428 Bug ID: 110428 Summary: missed CSE with VLA vectors Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- #include <stdint.h> void __attribute__((noinline,noclone)) foo (uint16_t *out, uint16_t *res) { int mask[] = { 0, 1, 1, 1, 1, 1, 1, 1 }; int i; for (i = 0; i < 8; ++i) { if (mask[i]) out[i] = 33; } uint16_t o0 = out[0]; uint16_t o7 = out[3]; uint16_t o14 = out[6]; uint16_t o15 = out[7]; res[0] = o0; res[2] = o7; res[4] = o14; res[6] = o15; } With -march=armv9.3-a -O3 -g0 -fno-vect-cost-model we fail to CSE the out[] loads after vectorization.
next reply other threads:[~2023-06-27 8:37 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-27 8:37 rguenth at gcc dot gnu.org [this message] 2023-06-27 8:39 ` [Bug tree-optimization/110428] " rguenth at gcc dot gnu.org 2023-06-27 10:12 ` rguenth at gcc dot gnu.org 2023-06-27 10:23 ` juzhe.zhong at rivai dot ai 2023-06-27 10:34 ` juzhe.zhong at rivai dot ai
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-110428-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).