FWIW, in GCC4TI for the TI-68k series, both A68k and GNU as for m68k can optimize some instructions - and then, the environment-specific linker can optimize more when there's full knowledge of the program: range-cutting, etc..
The A68k (documentation: https://debrouxl.github.io/gcc4ti/a68k.html
) and linker (documentation: https://debrouxl.github.io/gcc4ti/ld.html
) optimizations are disabled by default and enabled through command-line switches. However, at least one GNU as optimization is enabled by default: automatically turning two special, non-portable mnemonics to short form, or providing a long form of two mnemonics which exist only in word form: https://debrouxl.github.io/gcc4ti/gnuasm.html#SEC221
It works best inside a single source code file, and I'd say that this is mostly a misfeature for lazy programmers, though theoretically, it helps the code remain as optimized as possible when reordering inside a file: for instance, automatically taking advantage of 2-byte branches which may appear, while keeping 2-byte branches as such, and automatically adjusting 2-byte branches to 4 bytes.
If someone were to implement the optimization feature you mentioned in spasm, I'd strongly suggest that it be controlled by a command-line switch which defaults to disabled, of course
I have a weak preference for a special mnemonics which would be turned into either jp or jr, over automatic optimization of standard mnemonics: while it makes the code non-portable to other assemblers, the fact is that spasm-ng is the community assembler of choice nowadays, and spasm-ng is itself a multi-platform program.