[CodeGenPrepare] Fix bad IR created by large offset GEP splitting.
authorEli Friedman <efriedma@codeaurora.org>
Wed, 19 Dec 2018 22:52:04 +0000 (22:52 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Wed, 19 Dec 2018 22:52:04 +0000 (22:52 +0000)
commita69084ffa844d09d685a10b7b41a509c309687af
treeace01b91add6d2163bce5e623d6f6c9496ab75a1
parent1c286430c2668a7e39a5e415ef16a7282daa4c7a
[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

llvm-svn: 349693
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/Transforms/CodeGenPrepare/AArch64/large-offset-gep.ll