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/102897] [12 Regression] simplify_permutation ICEs on assert since r12-1103-g4a9f2306cb39a3cf Date: Mon, 25 Oct 2021 09:03:58 +0000 [thread overview] Message-ID: <bug-102897-4-wVHdOPNeFq@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102897-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102897 --- Comment #3 from Kewen Lin <linkw at gcc dot gnu.org> --- The culprit assertion is based on one assumption, for one given VEC_PERM_EXPR expression, if the type of permutation control vector and the type of permutation operand is the same, and it's foldable, then it's done previously. But from this case, this is not true. For example, for the case int8x8_t fn1(int8x8_t val20, char tmp) { int8x8_t __a = (int8x8_t){tmp}; return __builtin_shuffle(__a, val20, (int8x8_t){0, 1, 2, 3, 4, 5, 6, 7}); } we can get int8x8_t fn1 (int8x8_t val20, char tmp) { int8x8_t __a; <bb 2> : __a_2 = {tmp_1(D)}; return __a_2; } before forwprop, while for the case int8x8_t fn1(int8x8_t val20, char tmp) { int8x8_t __a = (int8x8_t){tmp}; return __builtin_shuffle(__a, val20, (int8x8_t){0, 1, 2, 3, 0, 1, 2, 3}); } we only get the below before forwprop, int8x8_t fn1 (int8x8_t val20, char tmp) { int8x8_t __a; int8x8_t _3; <bb 2> : __a_2 = {tmp_1(D)}; _3 = VEC_PERM_EXPR <__a_2, __a_2, { 0, 1, 2, 3, 0, 1, 2, 3 }>; return _3; } After remove the assertion there, we can get below immediately at forwprop. int8x8_t fn1 (int8x8_t val20, char tmp) { int8x8_t __a; int8x8_t _3; <bb 2> : __a_2 = {tmp_1(D)}; _3 = {tmp_1(D), 0, 0, 0, tmp_1(D), 0, 0, 0}; return _3; } I think we should remove this assertion.
next prev parent reply other threads:[~2021-10-25 9:03 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-22 11:22 [Bug tree-optimization/102897] New: [12 Regression] simplify_permutation ICEs on assert tnfchris at gcc dot gnu.org 2021-10-22 11:29 ` [Bug tree-optimization/102897] [12 Regression] simplify_permutation ICEs on assert since r12-1103-g4a9f2306cb39a3cf marxin at gcc dot gnu.org 2021-10-22 18:55 ` pinskia at gcc dot gnu.org 2021-10-25 2:20 ` linkw at gcc dot gnu.org 2021-10-25 6:43 ` rguenth at gcc dot gnu.org 2021-10-25 9:03 ` linkw at gcc dot gnu.org [this message] 2021-10-26 10:04 ` cvs-commit at gcc dot gnu.org 2021-10-27 7:44 ` cvs-commit at gcc dot gnu.org 2021-10-27 8:27 ` linkw 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-102897-4-wVHdOPNeFq@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).