InstSimplify: Fold gep X, (sub 0, ptrtoint(X)) to null
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 26 Aug 2014 07:08:03 +0000 (07:08 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 26 Aug 2014 07:08:03 +0000 (07:08 +0000)
commit8058ffeb18cd91196602b4675e30fb781e424358
treea257b33a009af4d83009db54026d266df838d36a
parent594e4a1dd36fb69e1420c643b0f548c2bb79c76c
InstSimplify: Fold gep X, (sub 0, ptrtoint(X)) to null

Save InstCombine some work if we can perform this fold during
InstSimplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216441 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstSimplify/gep.ll