[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Nov 13 13:18:00 PST 2003
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.142 -> 1.143
---
Log message:
Implement feature: InstCombine/2003-11-13-ConstExprCastCall.ll
---
Diffs of the changes: (+2 -1)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.142 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.143
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.142 Tue Nov 11 16:41:33 2003
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Nov 13 13:17:02 2003
@@ -1801,7 +1801,8 @@
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());
More information about the llvm-commits
mailing list