https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118940
--- Comment #12 from Miao Wang <shankerwangmiao at gmail dot com> ---
(In reply to Hongtao Liu from comment #11)
> (In reply to Miao Wang from comment #10)
> > (In reply to Hongtao Liu from comment #9)
> > > >
> > > > > Because I think the operands usage is broken.
> > > >
> > > > Additionally, by removing the do{ ... } while(0) wrap from
> > > > bigint_test_exec(), the issue disappears. I believe that if it is the
> > > > operands usage issue, the result should be the same no matter whether
> > > > it is
> > > > wrapped in a do{ ... } while(0).
> > >
> > > I think it just happened to hit the RA limitation, and it doesn't look
> > > like
> > > a performance/functionality regression either.
> >
> > But why the code compiles after removing the wrapping do {...} while(0)? I
> > believe the functionality of the code remains equivalent, so why it does not
> > hit the RA limitation without do {...} while(0), but hits with it?
>
> The compiler IRs are different(with small difference), w/ different input,
> RA behave differently.
In the original ipxe code[1], the inline function `bigint_init_raw`, containing
inline-asm code, is actually used in many places. Also, there is similar
inline-asm code in other functions in the same file. However, only this
specific function in the specific file causes this issue. So it can explain why
this problem is context-related.
But I wonder if the register constraint of the inline-asm in that code is
expected to work?