This is okay, but can you also add a target testcase to check that the correct assembly instructions are generated so that we can try to ensure this does not regress again?
This won't regress in this way again, because now the pattern is a single RTL op. But yes, target tests for this kind of thing would be quite useful. However, I'm going to overhaul the whole SCC thing, so I'd rather add tests for everything at once. OTOH, it's a good exercise I suppose... Your choice :-) Segher