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
This commit is contained in:
Chris Lattner 2003-11-13 19:17:02 +00:00
parent 623f707bee
commit 917e804253

View File

@ -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());