Implement feature: InstCombine/2003-11-13-ConstExprCastCall.ll

llvm-svn: 9981
This commit is contained in:
Chris Lattner 2003-11-13 19:17:02 +00:00
parent e7aa54f736
commit fe4e3f7108

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