On Thu, Nov 12, 2020 at 09:15:11AM -0700, Jeff Law wrote: > > void foo (void) > > { > > register float __attribute__ ((mode(SD))) r31 __asm__ ("r31"); > > register float __attribute__ ((mode(SD))) fr1 __asm__ ("fr1"); > > > > __asm__ ("#" : "=d" (fr1)); > > r31 = fr1; > > __asm__ ("#" : : "r" (r31)); > > } > > Looking at this again after many months away, I wonder the real problem > is the reloads we have to generate for copies to/from he fr1 local > variable, which is bound to hard reg fr1 rather than the asm statements > themselves. It's not clear to me from the BZ and I don't have a PPC > cross handy to look directly.
We should never do a reload of a (local) register variable. Unfortunately we cannot currently tell during reload that something is one! See also PR97708, and many more, going many years back. Segher