Remove the code which constant-folded ptrtoint(inttoptr(x)+c) to
authorDan Gohman <gohman@apple.com>
Tue, 23 Feb 2010 16:35:41 +0000 (16:35 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 23 Feb 2010 16:35:41 +0000 (16:35 +0000)
commitb80a2a686fe76496d71397f8bdda394d5718ab01
tree3bc7be4268bf1d153ff66df0d6d2d61e89611511
parentc80a1f7721823c081d80afa1345e4dc512cd97d7
Remove the code which constant-folded ptrtoint(inttoptr(x)+c) to
getelementptr. Despite only doing so in the case where x is a known
array object and c can be converted to an index within range, this
could still be invalid if c is actually the address of an object
allocated outside of LLVM. Also, SCEVExpander, the original motivation
for this code, has since been improved to avoid inttoptr+ptroint in
more cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96950 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ConstantFolding.cpp
test/Transforms/InstCombine/constant-fold-ptr-casts.ll [deleted file]