diff options
author | Jun Bum Lim <junbuml@codeaurora.org> | 2017-11-17 20:38:25 +0000 |
---|---|---|
committer | Jun Bum Lim <junbuml@codeaurora.org> | 2017-11-17 20:38:25 +0000 |
commit | 0f90672ae99d73bd11f16f9b39deb2fe94719434 (patch) | |
tree | e6c8a9d77bfc167d3c651fedb2ef25b39775a733 /llvm/lib/Transforms | |
parent | 51c63bb7efff5f90cd3894dc2b6f73a614dbfb96 (diff) | |
download | bcm5719-llvm-0f90672ae99d73bd11f16f9b39deb2fe94719434.tar.gz bcm5719-llvm-0f90672ae99d73bd11f16f9b39deb2fe94719434.zip |
[LICM] Fix PR35342
Summary: This change fix PR35342 by replacing only the current use with undef in unreachable blocks.
Reviewers: efriedma, mcrosier, igor-laevsky
Reviewed By: efriedma
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40184
llvm-svn: 318551
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index c60ec9f50f7..8e13fcede13 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -906,7 +906,7 @@ static bool sink(Instruction &I, LoopInfo *LI, DominatorTree *DT, continue; if (!DT->isReachableFromEntry(User->getParent())) { - User->replaceUsesOfWith(&I, UndefValue::get(I.getType())); + U = UndefValue::get(I.getType()); continue; } |