When compiling with --debug, fewer peephole optimizer rule are applied, Apparently the debug information confuses the peephole optimizer.
Example:
Compiling the regression tests for stm8, rule 22e gets applied for the modulong.c test. When adding the --debug flag, it does not get applied.
Fixed in [r13772], for stm8, pdk13, pdk14, pdk15 (those ports did not correctly pass the information about which lines are debug info to the peephole optimizer).
Related
Commit: [r13772]