[llvm-commits] [llvm] r60042 - in /llvm/trunk: lib/Support/APFloat.cpp test/Transforms/IndVarsSimplify/2008-11-25-APFloatAssert.ll

Chris Lattner clattner at apple.com
Tue Nov 25 17:18:07 PST 2008


On Nov 25, 2008, at 5:14 PM, Evan Cheng wrote:

>>>
>>> The client is calling convertToInteger(). How would it know it's not
>>> possible to convert ppc long double? Seems like only APFloat has  
>>> this
>>> information.
>>
>> Chris is right, it's currently caller's responsibility to check this.
>> Search for PPCDoubleDouble, you'll see examples.
>> isArithmeticOK is a good idea though, that's better than what it does
>> now.  But many places you've only got an MVT to look at.
>
> I've reverted this and added code to check for PPCDoubleDouble. It's
> important to keep all methods consistent. However, since these methods
> return a APFloat::opStatus, I think we should rely on that instead of
> the explicit semantics check.

Sure, how about adding a new opUnsupportedOp flag?  opInvalidOp means  
something to IEEE, opUnsupportedOp could mean "we don't know how to  
fold this" which is different.

-Chris



More information about the llvm-commits mailing list