Implement more aggressive folding of add operand lists when
authorDan Gohman <gohman@apple.com>
Sun, 14 Jun 2009 22:58:51 +0000 (22:58 +0000)
committerDan Gohman <gohman@apple.com>
Sun, 14 Jun 2009 22:58:51 +0000 (22:58 +0000)
commitbd59d7b603c364da52097f171a110a19c886f7bb
tree942d9454603671d4e30dc87ac0c19fa915bebfee
parent444f49150df8a4280ccea20fc2839cd899fc7558
Implement more aggressive folding of add operand lists when
they contain multiplications of constants with add operations.
This helps simplify several kinds of things; in particular it
helps simplify expressions like ((-1 * (%a + %b)) + %a) to %b,
as expressions like this often come up in loop trip count
computations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73361 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
test/Transforms/IndVarSimplify/pointer.ll [new file with mode: 0644]