[InstCombine] Do not insert a GEP instruction before a landingpad instruction.
authorAkira Hatanaka <ahatanaka@apple.com>
Wed, 18 Feb 2015 03:30:11 +0000 (03:30 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Wed, 18 Feb 2015 03:30:11 +0000 (03:30 +0000)
commit5506e22865a3d2d029dd717a15bfc8158eb5f4e9
treeab0f9112600edce4d9542f8e2e52d9507709341a
parent8a85dee9896864cf22316593face0db35718abeb
[InstCombine] Do not insert a GEP instruction before a landingpad instruction.

InstCombiner::visitGetElementPtrInst was using getFirstNonPHI to compute the
insertion point, which caused the verifier to complain when a GEP was inserted
before a landingpad instruction. This commit fixes it to use getFirstInsertionPt
instead.

rdar://problem/19394964

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