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/96135] [9/10/11 regression] bswap not detected by bswap pass, unexpected results between optimization levels Date: Thu, 11 Mar 2021 09:07:45 +0000 [thread overview] Message-ID: <bug-96135-4-hE7iM41qth@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 #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 50361 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50361&action=edit WIP On current trunk at -O3 f() again works via store-merging / vectorizing: - _21 = {_3, _4, _5, _6, _7, _8, _9, _10}; + bswapsrc_22 = (long unsigned int) i_2(D); + bswapdst_19 = __builtin_bswap64 (bswapsrc_22); + _21 = VIEW_CONVERT_EXPR<vector(8) char>(bswapdst_19); but g() does not, because init_symbolic_number doesn't like non-integral types. Fixing that generates _Z1gd: .LFB2: .cfi_startproc movq %xmm0, %rax bswap %rax ret but with -m32 it has the issue that we bswap only the lower part since vectorizing produced two vector CTORs. So we'd need to use a BIT_FIELD_REF to extract the integer representation. WIP patch attached.
next prev parent reply other threads:[~2021-03-11 9:07 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-09 14:01 [Bug tree-optimization/96135] New: " 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 [this message] 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 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-hE7iM41qth@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).