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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bergner at gcc dot gnu.org
   Last reconfirmed|2016-01-27 00:00:00         |2023-3-23

--- Comment #12 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to pthaugen from comment #11)
> Another example to clean up. The back to back constant load/sign extend
> sequence of rtl insns is created in each block by the block reordering pass
> (.bbo) duplicating the common return block.
> 
> int foo(int in)
> {
>    if (in == 1)
>      return 123;
>    return 0;
> }
> 
> 
> foo:
> .LFB0:
>       .cfi_startproc
>       cmpwi 0,3,1
>       beq 0,.L5
>       li 3,0
>       extsw 3,3
>       blr
>       .p2align 4,,15
> .L5:
>       li 3,123
>       extsw 3,3
>       blr

Cuurent trunk code for this is now:

foo:
        cmpwi 0,3,1
        beq 0,.L3
        li 3,0
        rldicl 3,3,0,32
        blr
        .p2align 4,,15
.L3:
        li 3,123
        rldicl 3,3,0,32
        blr

It's interested that we seem to have switched from a sign extension to a zero
extension.

Reply via email to