As I mentioned in a prior message on the subject, this is only a problem when the source/dest of the extension are the same. When the source/dest of the extension are different, we only optimize when the original set and extension are in the same block and we verify that all affected registers are not set/used between the original set and the extension. Bootstrapped and regression tested on x86_64-linux-gnu. Also tested execute.exp on rl78 with no regressions.
Ok. Bernd