This was found when building all configurations using the trunk compiler. A run-of-the-mill problem with left shifting -1.
To make sure I didn't muck anything up badly, I went back to Kazu's introduction of this pattern (2003), took his pseudo-code and turned it into a trivial h8300 specific test.
I also verified newlib built with the new compiler. newlib never triggers this pattern though.
I briefly pondered adding tests for the many other patterns Kazu added in 2003 as well as generalizing andsi3_ashift_n_lower, but I just couldn't justify that much time on the H8 port :-)
Installed on the trunk. Jeff