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

--- Comment #9 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Xi Ruoyao from comment #8)
> For LoongArch we also have a fallout:
> 
> __int128 test(__int128 a)
> {
>   return a << 16;
> }
> 
> is now
> 
>     srli.d  $r12,$r4,48
>     slli.d  $r5,$r5,16
>     slli.d  $r4,$r4,16
>     add.d   $r5,$r12,$r5
>     jr  $r1 
> 
> but actually r5 can be synthesized with a bytepick.d instruction instead.

P.S. This didn't work in GCC 14 because of another bug, but it's supposed to
work now if IOR was used instead of PLUS.

Reply via email to