https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790
--- Comment #9 from YunQiang Su <syq at gcc dot gnu.org> --- (In reply to Matthias Schiffer from comment #7) > (In reply to YunQiang Su from comment #6) > > The attached patch cannot work now. > > > > It is not correct, and it happened work due to good luck that the same > > register was allocated for these 2 instructions. > > I believe this is not the case. The gp init sequence is inserted very late, > and no register allocation is involved - the use of registers $2 and $3 is > hardcoded: Here $6(a2) is hardcoded, while $3(v1) is not.