https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82732
--- Comment #7 from Jeffrey A. Law <law at redhat dot com> --- Given that both DOM and strlen are already dom walker based, getting better range information in them is going to be easy. The former is actually part of the motivation behind the refactoring work. We actually don't need to muck around with ASSERT_EXPRs in the IL. THe analysis is the EVRP bits refactored. So you get a embeddable context sensitive range analysis that doesn't change the IL. It's just analyzes it as you walk the dominator tree allowing you to make queries during the walk. I've done a proof of concept with embedding it into Martin's sprintf work and it was truly trivial. Martin and I have lightly discussed adding the analysis to the strlen pass as probably being a high value target once the refactoring work his the trunk.