> -----Original Message----- > From: Matthew Fortune [mailto:matthew.fort...@imgtec.com] > Sent: Monday, July 06, 2015 11:00 AM > To: Andrew Bennett; gcc-patches@gcc.gnu.org > Cc: Moore, Catherine > Subject: RE: [PATCH] MIPS: Update stack-1.c testcase to match micromips > jraddiusp instruction. > > Andrew Bennett <andrew.benn...@imgtec.com> writes: > > The stack-1.c testcase fails when being compiled for micromips with > > the > > -O0 optimization level. The reason is the testcase is expecting the > > following sequence at the end of the function: > > > > addiu $sp,$sp,16 > > jrc $31 > > > > But for micromips it generates the following: > > > > jraddiusp 16 > > > > > > As the failure only happens at one optimization level I have decided > > to just change the expected output rather than creating a separate > > micromips testcase. > > I'm not sure this is the right approach here. If we get a jraddiusp then the > problem that the test is trying to cover can't possibly happen anyway. > (The test is checking if a load and final stack adjustment are ever re-ordered > from what I can see.) > > I'd just mark the test as NOCOMPRESSION instead of just NOMIPS16 and > update the comment to say that it is avoiding SAVE, RESTORE and > JRADDIUSP. >
Another approach would be to add the micromips testcase variant and skip the test if code-quality (ie. -O0). Catherine