public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/105991] New: rldicl+sldi+add generated instead of rldimi
@ 2022-06-15 17:09 mpolacek at gcc dot gnu.org
  2022-06-15 17:10 ` [Bug target/105991] [12/13 Regression] " mpolacek at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-06-15 17:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105991
           Summary: rldicl+sldi+add generated instead of rldimi
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

Starting with r12-2731-g96146e61cd7aee, this code (on ppc64le)

unsigned long long
foo (unsigned long long value)
{
  value &= 0xffffffff;
  value |= value << 32;
  return value;
}

compiled with -O2 generates

        rldicl 9,3,0,32
        sldi 3,3,32
        add 3,3,9
        blr

while previously it was just

        rldimi 3,3,32,0
        blr


It doesn't look like a wrong code problem, but it seems more optimal to use
rldimi (rotate left, mask insert) rather than rotate left by 0 bits, AND with a
mask, shift left, and add.

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

end of thread, other threads:[~2023-04-26  8:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 17:09 [Bug target/105991] New: rldicl+sldi+add generated instead of rldimi mpolacek at gcc dot gnu.org
2022-06-15 17:10 ` [Bug target/105991] [12/13 Regression] " mpolacek at gcc dot gnu.org
2022-06-16  7:57 ` roger at nextmovesoftware dot com
2022-06-16 14:49 ` mpolacek at gcc dot gnu.org
2022-06-16 17:33 ` mpolacek at gcc dot gnu.org
2022-06-18  1:55 ` segher at gcc dot gnu.org
2022-06-18  6:30 ` roger at nextmovesoftware dot com
2022-06-21 23:10 ` cvs-commit at gcc dot gnu.org
2022-06-24  9:49 ` roger at nextmovesoftware dot com
2022-06-24 15:33 ` segher at gcc dot gnu.org
2022-07-04 13:03 ` [Bug target/105991] [12 " cvs-commit at gcc dot gnu.org
2023-04-26  6:56 ` rguenth at gcc dot gnu.org
2023-04-26  8:01 ` roger at nextmovesoftware dot com

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