public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/106583] New: Suboptimal immediate generation on aarch64
@ 2022-08-11  9:01 ktkachov at gcc dot gnu.org
  2022-10-19 16:14 ` [Bug target/106583] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2022-08-11  9:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106583
           Summary: Suboptimal immediate generation on aarch64
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64

A simple codegen issue:
unsigned long long
foo (void)
{
  return 0x7efefefefefefeff;
}

generates at -O2
foo:
        mov     x0, 65279
        movk    x0, 0xfefe, lsl 16
        movk    x0, 0xfefe, lsl 32
        movk    x0, 0x7efe, lsl 48
        ret

whereas LLVM can do:
foo:                                    // @foo
        mov     x0, #-72340172838076674
        movk    x0, #65279
        movk    x0, #32510, lsl #48
        ret

Should be a matter of just making aarch64_internal_mov_immediate in aarch64.cc
a bit smarter

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

end of thread, other threads:[~2022-10-31 19:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-11  9:01 [Bug target/106583] New: Suboptimal immediate generation on aarch64 ktkachov at gcc dot gnu.org
2022-10-19 16:14 ` [Bug target/106583] " pinskia at gcc dot gnu.org
2022-10-19 16:14 ` pinskia at gcc dot gnu.org
2022-10-24 14:36 ` cvs-commit at gcc dot gnu.org
2022-10-25 12:05 ` wilco at gcc dot gnu.org
2022-10-31 19:21 ` pinskia 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).