diff options
author | Chris Lattner <sabre@nondot.org> | 2003-11-13 19:17:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-11-13 19:17:02 +0000 |
commit | d76fe4ea7d88628d43c1d4d7d55cf5d6776247b4 (patch) | |
tree | f4b4d9d1a7be0df5e369d59bfc8eca12a0ef38ec /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | 7ef8dfa9c34281e65f0e418af65a8c36ade8ae17 (diff) | |
download | bcm5719-llvm-d76fe4ea7d88628d43c1d4d7d55cf5d6776247b4.tar.gz bcm5719-llvm-d76fe4ea7d88628d43c1d4d7d55cf5d6776247b4.zip |
Implement feature: InstCombine/2003-11-13-ConstExprCastCall.ll
llvm-svn: 9981
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 8522b610e13..db178b3d1fd 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/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()); |