Hi Richard,
Do you really need peepholes for this? I would have thought that merely adding the instruction patterns for this would have been enough to encourage combine to do its job merging these patterns...
I thought so too, but I found in my tests that combine was missing plenty of cases where the optimization could take place. Hence I added the peepholes. (I admit that I did not delve deeply into *why* combine was not using my instruction pattens, I just found that the peepholes worked). Plus I reasoned that the peepholes could not hurt...
Cheers Nick