public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/100028] New: arm64 failure to generate bfxil
@ 2021-04-11  1:44 luc.vanoostenryck at gmail dot com
  2021-04-11  2:27 ` [Bug target/100028] [9/10/11 Regression] " pinskia at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: luc.vanoostenryck at gmail dot com @ 2021-04-11  1:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100028

            Bug ID: 100028
           Summary: arm64 failure to generate bfxil
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: luc.vanoostenryck at gmail dot com
  Target Milestone: ---
            Target: aarch64

Created attachment 50555
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50555&action=edit
should generate bfxil but doesn't

The attached code reproduced here:

#define W       3
#define L       11

int bfxil(int d, int s)
{
        int wmask = (1 << W) - 1;
        return (d & ~wmask) | ((s >> L) & wmask);
}

Should return:
        bfxil:
                bfxil   w0, w1, 11, 3
                ret

but instead returns:
        bfxil:
                ubfx    x1, x1, 11, 3
                and     w0, w0, -8
                orr     w0, w1, w0
                ret

The problem is still present in trunk, was also present in 9.3 but wasn't in
GCC 8.2 (see https://gcc.godbolt.org/z/E6z31hr9r ).

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-07-07  9:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-11  1:44 [Bug target/100028] New: arm64 failure to generate bfxil luc.vanoostenryck at gmail dot com
2021-04-11  2:27 ` [Bug target/100028] [9/10/11 Regression] " pinskia at gcc dot gnu.org
2021-04-12  8:28 ` rguenth at gcc dot gnu.org
2021-04-12 10:59 ` jakub at gcc dot gnu.org
2021-04-12 14:08 ` jakub at gcc dot gnu.org
2021-04-12 15:57 ` jakub at gcc dot gnu.org
2021-04-12 19:53 ` luc.vanoostenryck at gmail dot com
2021-04-13 10:44 ` cvs-commit at gcc dot gnu.org
2021-04-13 10:44 ` [Bug target/100028] [9/10 " jakub at gcc dot gnu.org
2021-04-16  3:42 ` luc.vanoostenryck at gmail dot com
2021-06-01  8:20 ` rguenth at gcc dot gnu.org
2022-05-27  9:44 ` [Bug target/100028] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:44 ` jakub at gcc dot gnu.org
2023-07-07  9:33 ` rguenth at gcc dot gnu.org

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).