OSDN Git Service

canonicalize inttoptr and ptrtoint instructions which cast pointers
authorChris Lattner <sabre@nondot.org>
Tue, 24 Mar 2009 18:35:40 +0000 (18:35 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 24 Mar 2009 18:35:40 +0000 (18:35 +0000)
commita0e6969bbe1c4de13b0c4635df03c354c3993ef7
tree9c28e116ffbfc49880477ec1fc624bc5403413b3
parent1f8c564d7df985082d7e728330979781f384d0e9
canonicalize inttoptr and ptrtoint instructions which cast pointers
to/from integer types that are not intptr_t to convert to intptr_t
then do an integer conversion to the dest type.  This exposes the
cast to the optimizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67638 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/ptr-int-cast.ll [new file with mode: 0644]