diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-05-30 18:32:23 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-05-30 18:32:23 +0000 |
commit | 50b26ebb2bec589885c011ca2eb771abe2bb9dd7 (patch) | |
tree | ade2740983763db29399e86c42bec0007a2b2152 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 6acd46f5e999c2f42f57d4bd8f236c864756787c (diff) | |
download | llvm-50b26ebb2bec589885c011ca2eb771abe2bb9dd7.zip llvm-50b26ebb2bec589885c011ca2eb771abe2bb9dd7.tar.gz llvm-50b26ebb2bec589885c011ca2eb771abe2bb9dd7.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions