projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
instcombine: Don't replace all uses for instructions with no uses
[oota-llvm.git]
/
lib
/
Transforms
/
InstCombine
/
InstCombineCalls.cpp
diff --git
a/lib/Transforms/InstCombine/InstCombineCalls.cpp
b/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 48f270429e5a66a25625c221deb504a9c79efbe9..b7b45a2473f430471181467f31ac3a39663a22a0 100644
(file)
--- a/
lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/
lib/Transforms/InstCombine/InstCombineCalls.cpp
@@
-786,7
+786,7
@@
Instruction *InstCombiner::tryOptimizeCall(CallInst *CI, const DataLayout *TD) {
if (CI->getCalledFunction() == 0) return 0;
if (Value *With = Simplifier->optimizeCall(CI))
- return ReplaceInstUsesWith(*CI, With);
+ return
CI->use_empty() ? CI :
ReplaceInstUsesWith(*CI, With);
return 0;
}