public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/94344] New: Rotate pattern not recognized anymore
@ 2020-03-26 16:14 stefansf at linux dot ibm.com
  2020-03-26 16:16 ` [Bug rtl-optimization/94344] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: stefansf at linux dot ibm.com @ 2020-03-26 16:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94344
           Summary: Rotate pattern not recognized anymore
           Product: gcc
           Version: 9.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stefansf at linux dot ibm.com
  Target Milestone: ---

Consider the following MWE:

int64_t f (int64_t x)                                                           
{                                                                               
  int64_t y = x & -49;                                                          
  return (y << 5) | (int64_t)((uint64_t)y >> 59);                               
}

Prior to patch c4c5ad1d6d1 combine successfully recognized the rotate pattern
and suggested amongst other the following insn (using `gcc -O3 -S
-fdump-rtl-combine-details test.c`):

(set (reg:DI 67)                                                                
    (rotate:DI (reg/v:DI 64 [ y ])                                              
        (const_int 5 [0x5])))

However, with patch c4c5ad1d6d1 applied, this is not the case anymore. Thus,
only combinations of shifts+and+ior are emitted.

This is reproducible for s390x on HEAD (16948c54b75) by simply reverting the
patch. Any idea how we could tweak combine back to the old behaviour where it
detected a rotate successfully?

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

end of thread, other threads:[~2020-04-03  6:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 16:14 [Bug rtl-optimization/94344] New: Rotate pattern not recognized anymore stefansf at linux dot ibm.com
2020-03-26 16:16 ` [Bug rtl-optimization/94344] " pinskia at gcc dot gnu.org
2020-03-26 16:17 ` [Bug rtl-optimization/94344] [9/10 Regression] " pinskia at gcc dot gnu.org
2020-03-27  7:49 ` rguenth at gcc dot gnu.org
2020-03-30 12:55 ` jakub at gcc dot gnu.org
2020-03-30 15:13 ` stefansf at linux dot ibm.com
2020-03-31  9:03 ` cvs-commit at gcc dot gnu.org
2020-03-31  9:10 ` [Bug rtl-optimization/94344] [9 " jakub at gcc dot gnu.org
2020-04-03  6:44 ` stefansf at linux dot ibm.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).