search for: converttofloat

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

2015 Jan 20
2
[LLVMdev] Bug in InsertElement constant propagation?
Does anybody else have an opinion on this issue? I'm planning to submit a patch which would add a new get method for ConstantDataVector taking an ArrayRef<Constant*> and use that in the few places in constant propagation where convertToFloat is used. Let me know if you think there is a more obvious way to do it. Right now the only way to create a ConstantDataVector are those method: /// get() constructors - Return a constant with vector type with an element /// count and element type matching the ArrayRef passed in. Note that...
2015 Jan 14
2
[LLVMdev] Bug in InsertElement constant propagation?
...CFP = dyn_cast<ConstantFP>(C)) { if (CFP->getType()->isFloatTy()) { SmallVector<float, 16> Elts; for (unsigned i = 0, e = V.size(); i != e; ++i) if (ConstantFP *CFP = dyn_cast<ConstantFP>(V[i])) Elts.push_back(CFP->getValueAPF().convertToFloat()); else break; if (Elts.size() == V.size()) return ConstantDataArray::get(C->getContext(), Elts); } Anyone knows what is the problem here? Cheers, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://l...
2015 Jan 14
2
[LLVMdev] Bug in InsertElement constant propagation?
...if (CFP->getType()->isFloatTy()) { > > SmallVector<float, 16> Elts; > > for (unsigned i = 0, e = V.size(); i != e; ++i) > > if (ConstantFP *CFP = dyn_cast<ConstantFP>(V[i])) > > Elts.push_back(CFP->getValueAPF().convertToFloat()); > > else > > break; > > if (Elts.size() == V.size()) > > return ConstantDataArray::get(C->getContext(), Elts); > > } > > Anyone knows what is the problem here? Both bit patterns are representations of NaN,...
2015 Jan 15
2
[LLVMdev] Bug in InsertElement constant propagation?
I don't see a way to create a ConstantDataVector from Constant or form APFloat though. Did I oversee that? Is the solution to had a new get function in ConstantDataVector to allow that? Any hint on what would be the right fix otherwise? Thomas -----Original Message----- From: Jonathan Roelofs [mailto:jonathan at codesourcery.com] Sent: Wednesday, January 14, 2015 10:30 AM To: Raoux, Thomas