Update InstCombine worklist after instruction transform is complete.
authorJim Grosbach <grosbach@apple.com>
Wed, 5 Oct 2011 20:05:00 +0000 (20:05 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 5 Oct 2011 20:05:00 +0000 (20:05 +0000)
commit30c1ff234d30567fc20d6c41d8fd9c3aacbbf9ca
tree7ae84d5f8e0377362408a105448aee00de292f6e
parent591c1c6754534fb72b4ca8d8444db4ddc4385e80
Update InstCombine worklist after instruction transform is complete.

When updating the worklist for InstCombine, the Add/AddUsersToWorklist
functions may access the instruction(s) being added, for debug output for
example. If the instructions aren't yet added to the basic block, this
can result in a crash. Finish the instruction transformation before
adjusting the worklist instead.

rdar://10238555

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141203 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/2010-11-01-lshr-mask.ll