diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-05-14 22:45:20 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-05-14 22:45:20 +0000 |
commit | a6c3112b1f486922dcff71794cb9d96f17750648 (patch) | |
tree | 19cab41f8eb12d4141020413449ebff851a31dd7 /lib/Transforms | |
parent | 6a33cc12ebf43b569ceea591c53edd3d507ad535 (diff) |
Situations can arise when you have a function called that returns a 'void', but
is bitcast to return a floating point value. The result of the instruction may
not be used by the program afterwards, and LLVM will happily remove all
instructions except the call. But, on some platforms, if a value is returned as
a floating point, it may need to be removed from the stack (like x87). Thus, we
can't get rid of the bitcast even if there isn't a use of the value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51134 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 06620557da..bb4b7016dc 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -8940,7 +8940,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { // Check to see if we are changing the return type... if (OldRetTy != FT->getReturnType()) { - if (Callee->isDeclaration() && !Caller->use_empty() && + if (Callee->isDeclaration() && // Conversion is ok if changing from pointer to int of same size. !(isa<PointerType>(FT->getReturnType()) && TD->getIntPtrType() == OldRetTy)) @@ -11516,7 +11516,7 @@ bool InstCombiner::runOnFunction(Function &F) { // Iterate while there is work to do. unsigned Iteration = 0; - while (DoOneIteration(F, Iteration++)) + while (DoOneIteration(F, Iteration++)) EverMadeChange = true; return EverMadeChange; } |