HomePhabricator

Generalize icmp matching in IndVars' eliminateTrunc

Description

Generalize icmp matching in IndVars' eliminateTrunc

We were only matching RHS being a loop invariant value, not the inverse. Since there's nothing which appears to canonicalize loop invariant values to RHS, this means we missed cases.

Differential Revision: https://reviews.llvm.org/D63112