Situations can arise when you have a function called that returns a 'void', but
authorBill Wendling <isanbard@gmail.com>
Wed, 14 May 2008 22:45:20 +0000 (22:45 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 14 May 2008 22:45:20 +0000 (22:45 +0000)
commita6c3112b1f486922dcff71794cb9d96f17750648
tree19cab41f8eb12d4141020413449ebff851a31dd7
parent6a33cc12ebf43b569ceea591c53edd3d507ad535
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
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll
test/Transforms/InstCombine/fp-ret-bitcast.ll [new file with mode: 0644]