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 | 917e8042535f67697f90310126c85804f7552fde (patch) | |
tree | f7fd38e5891412833c6fd081d8cc6133a1c36ca4 /lib/Transforms/Scalar | |
parent | 623f707bee5b0ff06409a9303d687cf777a2952a (diff) | |
download | external_llvm-917e8042535f67697f90310126c85804f7552fde.zip external_llvm-917e8042535f67697f90310126c85804f7552fde.tar.gz external_llvm-917e8042535f67697f90310126c85804f7552fde.tar.bz2 |
Implement feature: InstCombine/2003-11-13-ConstExprCastCall.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9981 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 8522b61..db178b3 100644 --- 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()); |