[CodeGenPrepare] Fix bad IR created by large offset GEP splitting.

Creating the IR builder, then modifying the CFG, leads to an IRBuilder
where the BB and insertion point are inconsistent, so new instructions
have the wrong parent.

Modified an existing test because the test wasn't covering anything
useful (the "invoke" was not actually an invoke by the time we hit the
code in question).

Differential Revision: https://reviews.llvm.org/D55729



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349693 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed