public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99398] Miss to optimize vector permutation fed by CTOR and CTOR/CST Date: Fri, 28 May 2021 06:13:35 +0000 [thread overview] Message-ID: <bug-99398-4-SJaJGssIlT@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99398-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99398 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Kewen Lin <linkw@gcc.gnu.org>: https://gcc.gnu.org/g:4a9f2306cb39a3cf265eeb6f8f3a8bbaf230c4c8 commit r12-1103-g4a9f2306cb39a3cf265eeb6f8f3a8bbaf230c4c8 Author: Kewen Lin <linkw@linux.ibm.com> Date: Fri May 28 01:11:45 2021 -0500 forwprop: Enhance vec perm fed by CTOR and CTOR/CST [PR99398] VEC_PERM_EXPR requires the number of MASK elements must be the same with the number of elements in operands V0 and V1. In some cases, like with Power altivec built-in function vec_perm, VIEW_CONVERT_EXPR has to be used to guarantee this requirement, but it can prevent some simplifications which don't consider this well. For the cases that the permutated operands of vector permutation are from two same type CTOR and CTOR, or one CTOR and one VECTOR CST, this patch is to enhance forwprop to look through intermediate VIEW_CONVERT_EXPR and further simplify them if possible. Bootstrapped/regtested on powerpc64le-linux-gnu P9, powerpc64-linux-gnu P8, x86_64-redhat-linux and aarch64-linux-gnu. gcc/ChangeLog: PR tree-optimization/99398 * tree-ssa-forwprop.c (simplify_permutation): Optimize some cases where the fed operands are CTOR/CST and propagated through VIEW_CONVERT_EXPR. Call vec_perm_indices::new_shrunk_vector. * vec-perm-indices.c (vec_perm_indices::new_shrunk_vector): New function. * vec-perm-indices.h (vec_perm_indices::new_shrunk_vector): New declare. gcc/testsuite/ChangeLog: PR tree-optimization/99398 * gcc.target/powerpc/vec-perm-ctor-run.c: New test. * gcc.target/powerpc/vec-perm-ctor.c: New test. * gcc.target/powerpc/vec-perm-ctor.h: New test.
next prev parent reply other threads:[~2021-05-28 6:13 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-05 6:53 [Bug tree-optimization/99398] New: " linkw at gcc dot gnu.org 2021-03-05 6:56 ` [Bug tree-optimization/99398] " linkw at gcc dot gnu.org 2021-03-08 3:20 ` linkw at gcc dot gnu.org 2021-05-28 6:13 ` cvs-commit at gcc dot gnu.org [this message] 2021-05-28 6:14 ` linkw at gcc dot gnu.org 2021-09-17 6:38 ` 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-99398-4-SJaJGssIlT@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).