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

--- Comment #23 from Jeffrey A. Law <law at gcc dot gnu.org> ---
This has devolved into a bit of a mess.

If we look at the repeating sequence in the original report we get:

        li      a5,16842752
        addi    a5,a5,257
        slli    a0,a5,32
        add     a0,a0,a5


That'll be faster than a memory reference.  It'll be 4c on a uber low end
design.  With typical lui+addi fusion, 3c.  I know of one design that should
handle that mess in 1c.  At best hitting the constant pool in memory will be
4c.    I'll take that 4 instruction sequence all day long.

The second constant is essentially the same from a performance standpoint. 
Similarly for the constant in c#20.

Pinski's case in c#12 should just be a distinct new bug.  I'll take care of
creating that.  Then I'll close this one.

Reply via email to