search for: rmtowardzero

Displaying 4 results from an estimated 4 matches for "rmtowardzero".

2015 Aug 10
2
Bug or expected behavior of APFloat class?
...ts(APFloat f) { APInt bits = f.bitcastToAPInt(); assert(bits.getActiveBits() <= 16); return (uint16_t) (bits.getZExtValue() & 0xffff); } int main(int argc, char** argv) { APFloat f(APFloat::IEEEhalf); APFloat newF(APFloat::IEEEhalf); f.convertFromString("0.3", APFloat::rmTowardZero); outs() << "f bits: 0x"; outs().write_hex(getBits(f)); outs() << "\n"; assert(getBits(f) == 0x34cc); // Check that if we get the string using FormatPrecision=0 // that this can be used to construct another APFloat of the // same value. std::string fA...
2019 Nov 15
3
RFC: token arguments and operand bundles
...nds can control these in any way they see fit. For instance, the front end might have a global setting the changes the rounding mode to “toward zero.” In that case, it would create constrained intrinsics for all FP operations and set the rounding mode argument (however we end up representing in) to rmTowardZero (a constant currently defined by LLVM corresponding to the “fpround.towardzero” metadata argument). Then the optimizer can use this information to perform optimizations like constant folding. Runtime changes to the rounding mode are a separate matter. As I said above, I think front ends should de...
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
2019 Nov 14
3
RFC: token arguments and operand bundles
Let me clarify. These aren’t intended to be exposed to the user. The user code that leads to the generation of these intrinsics will be normal floating point operations combined with either pragmas (such as “STDC FENV_ACCESS ON”) or command line options (such as the recently introduced “-fp-model=strict”). The reason I’ve been avoiding normal constant values is that it provides no information when