public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones
       [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
@ 2020-09-10 22:00 ` bergner at gcc dot gnu.org
  2020-09-29  1:15 ` bergner at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-09-10 22:00 UTC (permalink / raw)
  To: gcc-bugs

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

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2020-Septemb
                   |                            |er/553661.html
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |bergner at gcc dot gnu.org
                 CC|                            |bergner at gcc dot gnu.org

--- Comment #3 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #2)
> When you want the bits from bit MB to ME (inclusive) set, you can just do
> 
>   li t,-1
>   rldic d,T,MB,63-ME
> 
> (bit # 0 is the high bit; can also do wrap-around masks this way).

I submitted a patch that implements this idea.

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

* [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones
       [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
  2020-09-10 22:00 ` [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones bergner at gcc dot gnu.org
@ 2020-09-29  1:15 ` bergner at gcc dot gnu.org
  2020-11-18 18:15 ` bergner at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-09-29  1:15 UTC (permalink / raw)
  To: gcc-bugs

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

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|bergner at gcc dot gnu.org         |amodra at gcc dot gnu.org

--- Comment #4 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Peter Bergner from comment #3)
> I submitted a patch that implements this idea.

Actually, Alan is taking this over, so reassigning to him.

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

* [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones
       [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
  2020-09-10 22:00 ` [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones bergner at gcc dot gnu.org
  2020-09-29  1:15 ` bergner at gcc dot gnu.org
@ 2020-11-18 18:15 ` bergner at gcc dot gnu.org
  2020-11-19  3:56 ` amodra at gmail dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-11-18 18:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Peter Bergner <bergner at gcc dot gnu.org> ---
Alan, didn't one of your recent patches fix this particular bug?  So can we
mark this as fixed?

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

* [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones
       [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-11-18 18:15 ` bergner at gcc dot gnu.org
@ 2020-11-19  3:56 ` amodra at gmail dot com
  2023-08-16 10:35 ` jens.seifert at de dot ibm.com
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: amodra at gmail dot com @ 2020-11-19  3:56 UTC (permalink / raw)
  To: gcc-bugs

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

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|https://gcc.gnu.org/piperma |https://gcc.gnu.org/piperma
                   |il/gcc-patches/2020-Septemb |il/gcc-patches/2020-October
                   |er/553661.html              |/555760.html

--- Comment #6 from Alan Modra <amodra at gmail dot com> ---
No, the patch hasn't yet been reviewed.

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

* [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones
       [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-11-19  3:56 ` amodra at gmail dot com
@ 2023-08-16 10:35 ` jens.seifert at de dot ibm.com
  2023-08-18  0:52 ` amodra at gmail dot com
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: jens.seifert at de dot ibm.com @ 2023-08-16 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jens Seifert <jens.seifert at de dot ibm.com> ---
What happened ? Still waiting for improvement.

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

* [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones
       [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2023-08-16 10:35 ` jens.seifert at de dot ibm.com
@ 2023-08-18  0:52 ` amodra at gmail dot com
  2023-08-18  2:47 ` bergner at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: amodra at gmail dot com @ 2023-08-18  0:52 UTC (permalink / raw)
  To: gcc-bugs

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

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
           Assignee|amodra at gcc dot gnu.org          |unassigned at gcc dot gnu.org

--- Comment #8 from Alan Modra <amodra at gmail dot com> ---
Nothing happened.  The patch wasn't reviewed.  I didn't ping the patch.  I'm
not working on gcc any more, so should remove myself as assignee for this bug.

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

* [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones
       [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2023-08-18  0:52 ` amodra at gmail dot com
@ 2023-08-18  2:47 ` bergner at gcc dot gnu.org
  2023-08-18  6:10 ` jens.seifert at de dot ibm.com
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2023-08-18  2:47 UTC (permalink / raw)
  To: gcc-bugs

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

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |guojiufu at gcc dot gnu.org,
                   |                            |linkw at gcc dot gnu.org

--- Comment #9 from Peter Bergner <bergner at gcc dot gnu.org> ---
Jeff, none of your constant generation patches covers this, correct?  If not,
maybe given your recent work on improving the code gen for contents, maybe you
could pick up the patch and shepherd it to approval?  I would like to see this
work finally committed.

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

* [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones
       [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2023-08-18  2:47 ` bergner at gcc dot gnu.org
@ 2023-08-18  6:10 ` jens.seifert at de dot ibm.com
  2023-08-18  6:14 ` sjames at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: jens.seifert at de dot ibm.com @ 2023-08-18  6:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jens Seifert <jens.seifert at de dot ibm.com> ---
Looks like no patch in the area got delivered. I did a small test for 

unsigned long long c0000FFFF00000000()
{
    return 0x0000FFFF00000000ULL;
}

gcc 13.2.0:
        li 3,0
        ori 3,3,0xffff
        sldi 3,3,32

expected:
        li 3, -1
        rldic 3, 3, 32, 16

All consecutive ones can be created with li + rldic.

The rotate eliminates the bits on the right and the clear the bits on the left
as described below:

  li t,-1
  rldic d,T,MB,63-ME

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

* [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones
       [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2023-08-18  6:10 ` jens.seifert at de dot ibm.com
@ 2023-08-18  6:14 ` sjames at gcc dot gnu.org
  2023-08-18  6:20 ` guojiufu at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-08-18  6:14 UTC (permalink / raw)
  To: gcc-bugs

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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sjames at gcc dot gnu.org

--- Comment #11 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Jens Seifert from comment #10)
> Looks like no patch in the area got delivered. I did a small test for 
> 

Peter's was at
https://inbox.sourceware.org/gcc-patches/838b2e97-dfa9-3ca0-c3c6-1767d60ddf05@linux.ibm.com/,
Alan's may be
https://gcc.gnu.org/pipermail/gcc-patches/2020-September/553927.html.

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

* [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones
       [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2023-08-18  6:14 ` sjames at gcc dot gnu.org
@ 2023-08-18  6:20 ` guojiufu at gcc dot gnu.org
  2023-08-18 16:07 ` bergner at gcc dot gnu.org
  2023-10-08  2:36 ` guojiufu at gcc dot gnu.org
  11 siblings, 0 replies; 12+ messages in thread
From: guojiufu at gcc dot gnu.org @ 2023-08-18  6:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> ---
Thanks a lot for asking!

The patch which handles this is submitted at:
https://gcc.gnu.org/pipermail/gcc-patches/2023-July/623519.html

I would ping this patch again.  If ok, I will commit to trunk.

(And the series patches could be committed for "li/lis; rldicl/rldicr/rldic"
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621000.html)

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

* [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones
       [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2023-08-18  6:20 ` guojiufu at gcc dot gnu.org
@ 2023-08-18 16:07 ` bergner at gcc dot gnu.org
  2023-10-08  2:36 ` guojiufu at gcc dot gnu.org
  11 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2023-08-18 16:07 UTC (permalink / raw)
  To: gcc-bugs

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

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|https://gcc.gnu.org/piperma |https://gcc.gnu.org/piperma
                   |il/gcc-patches/2020-October |il/gcc-patches/2023-July/62
                   |/555760.html                |3519.html
             Status|NEW                         |ASSIGNED

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

* [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones
       [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2023-08-18 16:07 ` bergner at gcc dot gnu.org
@ 2023-10-08  2:36 ` guojiufu at gcc dot gnu.org
  11 siblings, 0 replies; 12+ messages in thread
From: guojiufu at gcc dot gnu.org @ 2023-10-08  2:36 UTC (permalink / raw)
  To: gcc-bugs

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

Jiu Fu Guo <guojiufu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #13 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> ---
Patches are committed for using "li/lis;rldicl/rldicr/rldic" to construct
constants.

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

end of thread, other threads:[~2023-10-08  2:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-93176-4@http.gcc.gnu.org/bugzilla/>
2020-09-10 22:00 ` [Bug target/93176] PPC: inefficient 64-bit constant consecutive ones bergner at gcc dot gnu.org
2020-09-29  1:15 ` bergner at gcc dot gnu.org
2020-11-18 18:15 ` bergner at gcc dot gnu.org
2020-11-19  3:56 ` amodra at gmail dot com
2023-08-16 10:35 ` jens.seifert at de dot ibm.com
2023-08-18  0:52 ` amodra at gmail dot com
2023-08-18  2:47 ` bergner at gcc dot gnu.org
2023-08-18  6:10 ` jens.seifert at de dot ibm.com
2023-08-18  6:14 ` sjames at gcc dot gnu.org
2023-08-18  6:20 ` guojiufu at gcc dot gnu.org
2023-08-18 16:07 ` bergner at gcc dot gnu.org
2023-10-08  2:36 ` guojiufu 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).