HomePhabricator

[IndVars] Use more precise context when eliminating narrowing

Authored by mkazantsev on Nov 24 2020, 8:46 PM.

Description

[IndVars] Use more precise context when eliminating narrowing

When deciding to widen narrow use, we may need to prove some facts
about it. For proof, the context is used. Currently we take the instruction
being widened as the context.

However, we may be more precise here if we take as context the point that
dominates all users of instruction being widened.

Differential Revision: https://reviews.llvm.org/D90456
Reviewed By: skatkov