Displaying 20 results from an estimated 275 matches for "apfloat".
2014 Aug 07
3
[LLVMdev] Proposal: Add a target lowering hook to state that target supports floating point exception behavior.
...>hasFloatingPointExceptions();
ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1.getNode());
ConstantFPSDNode *N2CFP = dyn_cast<ConstantFPSDNode>(N2.getNode());
if (N1CFP) {
@@ -3415,28 +3416,32 @@
switch (Opcode) {
case ISD::FADD:
s = V1.add(V2, APFloat::rmNearestTiesToEven);
- if (s != APFloat::opInvalidOp)
+ if (!HasFPExceptions || s != APFloat::opInvalidOp)
return getConstantFP(V1, VT);
break;
case ISD::FSUB:
s = V1.subtract(V2, APFloat::rmNearestTiesToEven);
- if (s!=APFloat::opInvalidOp...
2015 Aug 10
2
Bug or expected behavior of APFloat class?
Hi,
I've been playing around with the APFloat class lately and I came
across behavior I was not expecting based on reading the
implementation comments and I'm wondering if it's a bug or
intentional.
The behavior concerns converting an APFloat to a string and back
again. In the implementation of ``APFloat::toString(...)`` you can
speci...
2014 Aug 08
3
[LLVMdev] Proposal: Add a target lowering hook to state that target supports floating point exception behavior.
...Node *N1CFP = dyn_cast<ConstantFPSDNode>(N1.getNode());
>> ConstantFPSDNode *N2CFP = dyn_cast<ConstantFPSDNode>(N2.getNode());
>> if (N1CFP) {
>> @@ -3415,28 +3416,32 @@
>> switch (Opcode) {
>> case ISD::FADD:
>> s = V1.add(V2, APFloat::rmNearestTiesToEven);
>> - if (s != APFloat::opInvalidOp)
>> + if (!HasFPExceptions || s != APFloat::opInvalidOp)
>> return getConstantFP(V1, VT);
>> break;
>> case ISD::FSUB:
>> s = V1.subtract(V2, APFloat::rmNeares...
2007 Aug 18
1
[LLVMdev] Soft floating point support
This patch supplies software IEEE floating point support.
The comment from the patch reproduced below says all there is
to say.
This patch contains the prior "cleanup" patch; please don't apply
that one.
Please let me know of any bugs. It is tested reasonably well,
but until I put together random tests it's hard to have 100%
confidence.
Neil.
/* A self-contained host- and
2010 Jul 09
2
[LLVMdev] APFloat::convertToDouble asserts
>>
>> I wonder why APFloat::convertToDouble asserts if it is not an
>> APFloat::IEEEdouble while the name "convertToDouble" suggests that it
>> converts when it is not a double.
>
> The conversion is to (host) double, as the name implies. Among
> APFloat types, that is only implemented for AP...
2016 Oct 03
2
[PPC, APFloat] Add full PPCDoubleDouble to APFloat
...he sum of two
> double-precision numbers, and the various arithmetic operations are formed
> mostly in terms of double-precision arithmetic on the elements of the
> pairs. As a result, I suspect we really just want to store the two
> double-precision numbers, and essentially delegate to APFloat IEEEdouble in
> the implementation of the various operations.
>
> As such, one option might be that, when PPCDoubleDouble fltSemantics are
> selected, the exponent and sign are ignored, and we just store the data for
> the two double-precision floating-point numbers in the significan...
2016 Sep 30
2
[PPC, APFloat] Add full PPCDoubleDouble to APFloat
I have found some internal test failures due to the wrong constant folding
on ppc_fp128.
As documented in APFloat::PPCDoubleDouble, APFloat doesn't support PowerPC
double-double correctly <
https://github.com/llvm-mirror/llvm/blob/492acdd450bcdf9837494d6da029ed064f14fc33/lib/Support/APFloat.cpp#L74
>.
To support this, we need to add a second tuple of (sign, exponent,
significand) to APFloat. I wonde...
2007 Dec 08
3
[LLVMdev] APFloat.h header file usage
Hi,
I'm trying to separate the Support, System, ADT and Config header files
into the support module, per previous plans. However, APFloat.h is not
self-contained:
APFloat.h:105:43: error: llvm/Bitcode/SerializationFwd.h: No such file
or directory
APFloat.h:106:37: error: llvm/CodeGen/ValueTypes.h: No such file or
directory
As you can see, APFloat.h depends on things that are not in the ADT,
Support, or System header files. This, in...
2007 Dec 08
0
[LLVMdev] APFloat.h header file usage
On Dec 8, 2007, at 1:13 AM, Reid Spencer wrote:
> Hi,
>
> I'm trying to separate the Support, System, ADT and Config header
> files
> into the support module, per previous plans. However, APFloat.h is not
> self-contained:
>
> APFloat.h:105:43: error: llvm/Bitcode/SerializationFwd.h: No such file
> or directory
> APFloat.h:106:37: error: llvm/CodeGen/ValueTypes.h: No such file or
> directory
>
> As you can see, APFloat.h depends on things that are not in the ADT,
>...
2012 Jul 10
2
[LLVMdev] Clang error compiling
llvm[1]: Compiling APFloat.cpp for Release+Asserts build
clang: TargetInfo.cpp:1778: llvm::Type
*GetX86_64ByValArgumentPair(llvm::Type *, llvm::Type *, const
llvm::TargetData &): Assertion `Lo->isIntegerTy() && "Invalid/unknown lo
type"' failed.
0 clang 0x0000000001c132ef
1 clang...
2007 Dec 08
2
[LLVMdev] APFloat.h header file usage
...On Sat, 2007-12-08 at 06:59 -0800, Ted Kremenek wrote:
> On Dec 8, 2007, at 1:13 AM, Reid Spencer wrote:
>
> > Hi,
> >
> > I'm trying to separate the Support, System, ADT and Config header
> > files
> > into the support module, per previous plans. However, APFloat.h is not
> > self-contained:
> >
> > APFloat.h:105:43: error: llvm/Bitcode/SerializationFwd.h: No such file
> > or directory
> > APFloat.h:106:37: error: llvm/CodeGen/ValueTypes.h: No such file or
> > directory
> >
> > As you can see, APFloat.h depend...
2010 Jul 09
0
[LLVMdev] APFloat::convertToDouble asserts
On Jul 9, 2010, at 12:59 PMPDT, Jochen Wilhelmy wrote:
>>> I wonder why APFloat::convertToDouble asserts if it is not an
>>> APFloat::IEEEdouble while the name "convertToDouble" suggests that
>>> it
>>> converts when it is not a double.
>>
>> The conversion is to (host) double, as the name implies. Among
>> APFloat ty...
2010 Jul 09
2
[LLVMdev] APFloat::convertToDouble asserts
Hi!
I wonder why APFloat::convertToDouble asserts if it is not an
APFloat::IEEEdouble while the name "convertToDouble" suggests that it
converts when it is not a double.
-Jochen
2010 Jul 09
2
[LLVMdev] APFloat::convertToDouble asserts
> I'd rather not. The functionality you want is there, feed another
> APFloat type through APFloat::convert first.
>
> Using host FP is not something that should be encouraged; the main
> point of APFloat is so people don't have to do that. Why do you want
> to, btw?
>
Yes, i got it working using APFloat::convert. I need host float to
output to my bac...
2010 Jul 09
0
[LLVMdev] APFloat::convertToDouble asserts
On Jul 9, 2010, at 7:59 AMPDT, Jochen Wilhelmy wrote:
> Hi!
>
> I wonder why APFloat::convertToDouble asserts if it is not an
> APFloat::IEEEdouble while the name "convertToDouble" suggests that it
> converts when it is not a double.
The conversion is to (host) double, as the name implies. Among
APFloat types, that is only implemented for APFloat::IEEEdouble.
2007 Dec 08
0
[LLVMdev] APFloat.h header file usage
On Dec 8, 2007, at 11:33 AM, Reid Spencer wrote:
> Okay, but I imagine that leaves it still being used in APFloat.cpp
> which
> is also trying to be segregated to the support module.
>>
>> If this doesn't seem like a clean enough solution, there are other
>> ways to potentially decouple APFloat more from the Serialization
>> "library." The tradeoff is that it woul...
2008 Jun 09
7
[LLVMdev] regression? Or did I do something wrong again?
...ndrik at lovesong:~/dv/llvm/tut$ g++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o toy
toy.cpp: In member function ‘virtual llvm::Value* NumberExprAST::Codegen()’:
toy.cpp:359: error: no matching function for call to ‘llvm::ConstantFP::get(const llvm::Type*&, llvm::APFloat)’
/usr/local/llvm/include/llvm/Constants.h:237: note: candidates are: static llvm::ConstantFP* llvm::ConstantFP::get(const llvm::APFloat&)
/usr/local/llvm/include/llvm/Constants.h:242: note: static llvm::ConstantFP* llvm::ConstantFP::get(const llvm::Type*, double)
hendrik at lov...
2010 Jul 09
0
[LLVMdev] APFloat::convertToDouble asserts
On Jul 9, 2010, at 1:20 PMPDT, Jochen Wilhelmy wrote:
>> I'd rather not. The functionality you want is there, feed another
>> APFloat type through APFloat::convert first.
>>
>> Using host FP is not something that should be encouraged; the main
>> point of APFloat is so people don't have to do that. Why do you
>> want to, btw?
>
> Yes, i got it working using APFloat::convert. I need host floa...
2012 Jul 24
2
[LLVMdev] Is append in APFloat broken?
Hi @llvm,
I stumbled over a strange behavior if a float containing a NaN is
printed (e.g. in the clang rewriter). The local template method "append"
in APFloat.cpp deduces the size from the char array, which for "NaN" is
4 (including the trailing zero). If APFloat::toString is called with a
SmallString and then SmallString::str() is called, it returns "NaN\0". I
guess that this is not intended. Maybe it can be fixed by the simple
p...
2008 Jun 06
3
[LLVMdev] StmtPrinter long double support.
Hello,
I'm playing with llvm/clang and I have a problem when I try to use the
-ast-print options for a file that uses long double.
The Basic/Targets.cpp file defined the x86 (and x86_64) long double
type as APFloat::x87DoubleExtended.
Then, when the AST printer try to write a long double literal value
(using VisitFloatingLiteral()), it call FloatingLiteral-
>getValueAsDouble() and the later does not support long double, so it
try to call convertToDouble() as a fallback and crash due to an
invalid a...