projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
623f707
)
Implement feature: InstCombine/2003-11-13-ConstExprCastCall.ll
author
Chris Lattner
<sabre@nondot.org>
Thu, 13 Nov 2003 19:17:02 +0000
(19:17 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 13 Nov 2003 19:17:02 +0000
(19:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9981
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index 8522b610e1378093eaa6c52e260dbb917aa5145e..db178b3d1fdbc808ba95453858ccecbe3925c9c2 100644
(file)
--- a/
lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/
lib/Transforms/Scalar/InstructionCombining.cpp
@@
-1801,7
+1801,8
@@
bool InstCombiner::transformConstExprCastCall(CallSite CS) {
const Type *OldRetTy = Caller->getType();
if (Callee->isExternal() &&
- !OldRetTy->isLosslesslyConvertibleTo(FT->getReturnType()))
+ !OldRetTy->isLosslesslyConvertibleTo(FT->getReturnType()) &&
+ !Caller->use_empty())
return false; // Cannot transform this return value...
unsigned NumActualArgs = unsigned(CS.arg_end()-CS.arg_begin());