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/96135] [9/10/11/12 regression] bswap not detected by bswap pass, unexpected results between optimization levels Date: Wed, 08 Sep 2021 10:48:13 +0000 [thread overview] Message-ID: <bug-96135-4-3nmhB6A1VW@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-96135-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96135 --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note on the trunk for f and g at -O3 -msse4 (and -O3 on aarch64), GCC produces: _21 = VIEW_CONVERT_EXPR<vector(8) char>(i_2(D)); _22 = VEC_PERM_EXPR <_21, _21, { 7, 6, 5, 4, 3, 2, 1, 0 }>; _18 = VIEW_CONVERT_EXPR<long long int>(_22); But that VEC_PERM_EXPR is a bswap :). So to fix this at -O3 -msse4, maybe we could just do: (simplify (view_convert (vec_perm @0 @0 vector_cst_byteswap_p @1)) (if (INTERGAL_TYPE_P (type))) (convert (bswap (view_convert @1)))) Note I don't think we want to do the byteswap in the integer registers if we are going back to the floating point registers.
next prev parent reply other threads:[~2021-09-08 10:48 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-09 14:01 [Bug tree-optimization/96135] New: [9/10/11 " tobi at gcc dot gnu.org 2020-07-10 7:19 ` [Bug tree-optimization/96135] " rguenth at gcc dot gnu.org 2021-03-11 9:07 ` rguenth at gcc dot gnu.org 2021-03-31 9:13 ` rguenth at gcc dot gnu.org 2021-06-01 8:18 ` [Bug tree-optimization/96135] [9/10/11/12 " rguenth at gcc dot gnu.org 2021-09-08 10:48 ` pinskia at gcc dot gnu.org [this message] 2021-09-08 10:58 ` pinskia at gcc dot gnu.org 2022-05-27 9:43 ` [Bug tree-optimization/96135] [10/11/12/13 " rguenth at gcc dot gnu.org 2022-06-28 10:41 ` jakub at gcc dot gnu.org 2023-07-07 10:37 ` [Bug tree-optimization/96135] [11/12/13/14 " rguenth 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-96135-4-3nmhB6A1VW@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).