On Thu, 12 May 2016, Richard Biener wrote:

Yeah - note that VRP already calls set_range_info before simplifying stmts. It's just that substitute_and_fold doesn't apply fold_stmt (and thus match.pd) to all stmts but it only applies the pass specific "fold" (vrp_fold_stmt) to all stmts.

Just to be sure: is the fact that VRP doesn't apply fold_stmt on purpose? The restriction makes sense, it is just that it may yield a bit of duplication. We already indirectly use get_range_info in match.pd and may miss out on opportunities that only occur in branches during the VRP pass.

--
Marc Glisse

Reply via email to