On Fri, 2022-03-11 at 21:26 +0000, Qing Zhao wrote: > Hi, Ruoyao, > > (I might not be able to reply to this thread till next Wed due to a > short vacation). > > First, some comments on opening bugs against Gcc: > > I took a look at the bug reports PR104817 and PR104820: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104820 > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104817 > > I didn’t see a testing case and a script to repeat the error, so I > cannot repeat the error at my side.
I've put the test case, but maybe you didn't see it because it is too simple: echo 'int t() {}' | /home/xry111/git-repos/gcc-test-mips/gcc/cc1 -nostdinc -fzero-call-used-regs=all An empty function is enough to break -fzero-call-used-regs=all. And if you append -mips64r2 to the cc1 command line you'll get 104820. I enabled 4 existing tests for MIPS (reported "not work" on MIPS) in the patch so I think it's unnecessary to add new test cases. Richard: can we use MIPS_EPILOGUE_TEMP as a scratch register in the sequence for zeroing the call-used registers, and then zero itself (despite it's not in need_zeroed_hardregs)? -- Xi Ruoyao <xry...@mengyan1223.wang> School of Aerospace Science and Technology, Xidian University