[LoopVectorize] Use ReplaceInstWithInst() helper where appropriate.
authorAlexey Samsonov <vonosmas@gmail.com>
Wed, 1 Jul 2015 22:18:30 +0000 (22:18 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Wed, 1 Jul 2015 22:18:30 +0000 (22:18 +0000)
commit739ded16a551fc06cd8dfc0fc909c395e8126745
tree2852fd89e4d7c8961877166133fcf89202286b6f
parentf89e1bdc1a54c3bf211e86132af7c51bac8a7374
[LoopVectorize] Use ReplaceInstWithInst() helper where appropriate.

This is mostly an NFC, which increases code readability (instead of
saving old terminator, generating new one in front of old, and deleting
old, we just call a function). However, it would additionaly copy
the debug location from old instruction to replacement, which
would help PR23837.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241197 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/runtime-check.ll