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/107412] New: Miss to fold LEN_{LOAD,STORE} when the specified length equal to vector length Date: Wed, 26 Oct 2022 09:13:53 +0000 [thread overview] Message-ID: <bug-107412-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107412 Bug ID: 107412 Summary: Miss to fold LEN_{LOAD,STORE} when the specified length equal to vector length Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: linkw at gcc dot gnu.org Target Milestone: --- test case: === #define N 16 int src[N]; int dest[N]; void foo (){ for (int i = 0; i < (N-1); i++) dest[i] = src[i]; } === Options: -mcpu=power10 -fno-tree-loop-distribute-patterns --param vect-partial-vector-usage=2 -O2 -ftree-vectorize -funroll-loops -fno-vect-cost-model optimized gimple output: void foo () { vector(16) unsigned char vect_2; vector(16) unsigned char vect_13; vector(16) unsigned char vect_34; vector(16) unsigned char vect_47; <bb 2> [local count: 67108864]: vect_2 = .LEN_LOAD (&src, 128B, 16, 0); .LEN_STORE (&dest, 128B, 16, vect_2, 0); vect_34 = .LEN_LOAD (&MEM <int[16]> [(void *)&src + 16B], 128B, 16, 0); .LEN_STORE (&MEM <int[16]> [(void *)&dest + 16B], 128B, 16, vect_34, 0); vect_47 = .LEN_LOAD (&MEM <int[16]> [(void *)&src + 32B], 128B, 16, 0); .LEN_STORE (&MEM <int[16]> [(void *)&dest + 32B], 128B, 16, vect_47, 0); vect_13 = .LEN_LOAD (&MEM <int[16]> [(void *)&src + 48B], 128B, 12, 0); .LEN_STORE (&MEM <int[16]> [(void *)&dest + 48B], 128B, 12, vect_13, 0); [tail call] return; } It's expected that we only have one separated .LEN_LOAD and .LEN_STORE with length 12, the others can adopt just normal vector load/store.
next reply other threads:[~2022-10-26 9:13 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-26 9:13 linkw at gcc dot gnu.org [this message] 2022-10-26 9:15 ` [Bug tree-optimization/107412] " linkw at gcc dot gnu.org 2022-10-27 22:03 ` segher at gcc dot gnu.org 2022-10-31 6:39 ` linkw at gcc dot gnu.org 2022-11-07 8:17 ` cvs-commit at gcc dot gnu.org 2022-11-07 8:25 ` linkw at gcc dot gnu.org 2022-11-07 8:25 ` linkw at gcc dot gnu.org 2022-12-05 5:28 ` cvs-commit 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-107412-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).