Skip to content
Commit 50b26ebb authored by Benjamin Kramer's avatar Benjamin Kramer
Browse files

Teach SCEV's icmp simplification logic that a-b == 0 is equivalent to a == b.

This also required making recursive simplifications until
nothing changes or a hard limit (currently 3) is hit.

With the simplification in place indvars can canonicalize
loops of the form
for (unsigned i = 0; i < a-b; ++i)
into
for (unsigned i = 0; i != a-b; ++i)
which used to fail because SCEV created a weird umax expr
for the backedge taken count.

llvm-svn: 157701
parent 6acd46f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment