[LoopStrengthReduce] Don't increment iterator past the end of the BB
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 16 Nov 2015 17:37:58 +0000 (17:37 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 16 Nov 2015 17:37:58 +0000 (17:37 +0000)
commit578dced0a16fd5011ce61da6d46f63a8aa64dcb5
treec2c2bd2f3191f2817c4c4deb0c874ffaad75e226
parenta90c8e5d67eb05565eccc71258ed396e176974a6
[LoopStrengthReduce] Don't increment iterator past the end of the BB

We tried to move the insertion point beyond instructions like landingpad
and cleanuppad.
However, we *also* tried to move past catchpad.  This is problematic
because catchpad is also a terminator.

This fixes PR25541.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253238 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/Transforms/LoopStrengthReduce/pr25541.ll [new file with mode: 0644]