Peephole rule 164 is broken (in peeph.def, i.e. the common rules for all z80-related ports). Apparently, this led to a regression observed by gbdk developers using the sm83 port when they were testing SDCC 4.5.0 RC2. I was able to come up with a small code sample to reproduce the issue using the z80 port:
char f(char *c);
void g(void)
{
char c[4];
if(f(c))
return;
if(f(c))
return;
}
Fixed in the next branch in [r15241].
Related
Commit: [r15241]
The fix has been merged to trunk an is in SDCC 4.5.0.