generalize the pointer difference optimization to handle
authorChris Lattner <sabre@nondot.org>
Fri, 1 Jan 2010 22:42:29 +0000 (22:42 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 1 Jan 2010 22:42:29 +0000 (22:42 +0000)
commit85c1c964dc5b73085f2b2dce1cfc171fa9b765e2
treec4335ee741506654a5e7d0dcc8148f8d7402930f
parentf2ebc682d1ee008782d44261f28e92bf982790c2
generalize the pointer difference optimization to handle
a constantexpr gep on the 'base' side of the expression.
This completes comment #4 in PR3351, which comes from
483.xalancbmk.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92402 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/sub.ll