Here's an updated patch to add more type narrowing to match.pd. Changes since the last version: Slight refactoring of the condition by using types_match as suggested by Richi. I also applied the new types_match to 2 other patterns in match.pd where it seemed clearly appropriate. Additionally the transformation is restricted by using the new single_use predicate. I didn't change other patterns in match.pd to use the new single_use predicate. But some probably could be changed. This (of course) continues to pass the bootstrap and regression check for x86-linux-gnu. There's still a ton of work to do in this space. This is meant to be an incremental stand-alone improvement. OK now? Jeff