search for: constantfp

Displaying 20 results from an estimated 151 matches for "constantfp".

2008 Jun 09
7
[LLVMdev] regression? Or did I do something wrong again?
...stalled last weekend, it does not compile: hendrik 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::ge...
2007 Sep 05
2
[LLVMdev] Seeing a crash with ConstantFP::get
Hola LLVMers, I'm getting a crash when using ConstantFP::get. I can repro it by adding one line to the Fibonacci example program: int main(int argc, char **argv) { int n = argc > 1 ? atol(argv[1]) : 24; // Create some module to put our function into it. Module *M = new Module("test"); // We are about to create the...
2007 Sep 05
2
[LLVMdev] Seeing a crash with ConstantFP::get
...ple assignment in zeroSignificand. ________________________________ From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Dale Johannesen Sent: Wednesday, September 05, 2007 2:39 PM To: LLVM Developers Mailing List Subject: Re: [LLVMdev] Seeing a crash with ConstantFP::get On Sep 5, 2007, at 2:21 PM, Chuck Rose III wrote: Hola LLVMers, I'm getting a crash when using ConstantFP::get. I can repro it by adding one line to the Fibonacci example program: int main(int argc, char **argv) { int n = argc > 1 ? atol(argv[1]) : 24; /...
2007 Sep 05
0
[LLVMdev] Seeing a crash with ConstantFP::get
On Sep 5, 2007, at 2:21 PM, Chuck Rose III wrote: > Hola LLVMers, > > > > I’m getting a crash when using ConstantFP::get. > > > > I can repro it by adding one line to the Fibonacci example program: > > > > int main(int argc, char **argv) { > > int n = argc > 1 ? atol(argv[1]) : 24; > > > > // Create some module to put our function into it. > > Module *M =...
2013 Jul 22
6
[LLVMdev] Inverse of ConstantFP::get and similar functions?
Hi, I noticed that ConstantFP::get automatically returns the appropriately types Constant depending on the LLVM type passed in (i.e. if called with a vector, it returns a splat vector with the given constant). Is there any simple way to do the inverse of this function? i.e., given a llvm::Value, check whether it is either a sc...
2007 Sep 06
0
[LLVMdev] Seeing a crash with ConstantFP::get
...I try that out. Thanks, Chuck. ________________________________ From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Chuck Rose III Sent: Wednesday, September 05, 2007 2:51 PM To: LLVM Developers Mailing List Subject: Re: [LLVMdev] Seeing a crash with ConstantFP::get It's in debug. I'm having a look at the assembler it's producing right now and it's definitely a little odd for what should be a simple assignment in zeroSignificand. ________________________________ From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs....
2013 Jul 22
0
[LLVMdev] Inverse of ConstantFP::get and similar functions?
----- Original Message ----- > Hi, > > I noticed that ConstantFP::get automatically returns the > appropriately > types Constant depending on the LLVM type passed in (i.e. if called > with a vector, it returns a splat vector with the given constant). > > Is there any simple way to do the inverse of this function? i.e., > given a llvm::Value, c...
2019 Sep 26
2
ConstantFP->getType() is not right
Hi, I want to create a double constant from a float constant, here's my code: auto* constFloat1 = static_cast<llvm::ConstantFP*>(llvm::ConstantFP::get(llvm::Type::getFloatTy(context), 3.1)); assert(constFloat1->getType() == llvm::Type::getFloatTy(context)); auto* constFloat2 = llvm::ConstantFP::get(llvm::Type::getDoubleTy(context), constFloat1->getValueAPF()); assert(constFloat2->getType() == llvm::Ty...
2008 Sep 25
3
[LLVMdev] Cannot Select ConstantFP on x86
I just ran into this today with x86-64: Cannot yet select: 0x3cbc180: f64 = ConstantFP <1> As far as I can tell, DAGCombiner comes along and sees an sint_to_fp of the constant 1 and hapilly folds it into a ConstantFP<1>. ISel then blows up because there's no pattern for it. Does this look familiar to anyone? I don't see any relevant bugs in the database....
2014 May 05
3
[LLVMdev] get unsigned integer pattern for ConstantFP
What is the proper way to get the bit pattern associated with a ConstantFP? The 32 bit pattern if MVT::f32 or pair of 32 bit patterns with MVT::f64 ? Tia. Reed
2008 Jun 09
0
[LLVMdev] regression? Or did I do something wrong again?
Hi Hendrik, > hendrik 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::Cons...
2008 Apr 20
1
[LLVMdev] ConstantFP API Change
Hi All, At some point in the next week or two I'm going to remove the ConstantFP::get(type, APFloat) method. Right now, you can immediately fix your code by dropping the first 'type' argument. For example, if you have: ConstantFP::get(Ty, APFloat(1.0)) just change it to: ConstantFP::get(APFloat(1.0)) Both forms work with SVN head right now so you can mig...
2008 Jun 09
0
[LLVMdev] regression? Or did I do something wrong again?
...ot compile: > > hendrik 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::...
2007 Sep 06
2
[LLVMdev] Seeing a crash with ConstantFP::get
...g. > Thanks, > > Chuck. > > > > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev- > bounces at cs.uiuc.edu] On Behalf Of Chuck Rose III > Sent: Wednesday, September 05, 2007 2:51 PM > To: LLVM Developers Mailing List > Subject: Re: [LLVMdev] Seeing a crash with ConstantFP::get > > > > It’s in debug. I’m having a look at the assembler it’s producing > right now and it’s definitely a little odd for what should be a > simple assignment in zeroSignificand. > > > > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev- > bounces at c...
2013 Jul 22
0
[LLVMdev] Inverse of ConstantFP::get and similar functions?
On Mon, Jul 22, 2013 at 10:19 AM, Stephen Lin <swlin at post.harvard.edu> wrote: > Hi, > > I noticed that ConstantFP::get automatically returns the appropriately > types Constant depending on the LLVM type passed in (i.e. if called > with a vector, it returns a splat vector with the given constant). > > Is there any simple way to do the inverse of this function? i.e., > given a llvm::Value, check w...
2015 Jan 14
2
[LLVMdev] Bug in InsertElement constant propagation?
...hen convert it back when creating the ConstantDataArray. This causes the float value to be changed. I'm not entirely positive why the float value returned by converToFloat has a different memory representation than the original int value, there must be a C++ rule that I'm missing. d if (ConstantFP *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(...
2008 Sep 26
0
[LLVMdev] Cannot Select ConstantFP on x86
On Sep 24, 2008, at 5:11 PM, David Greene wrote: > I just ran into this today with x86-64: > > Cannot yet select: 0x3cbc180: f64 = ConstantFP <1> > > As far as I can tell, DAGCombiner comes along and sees an sint_to_fp > of the > constant 1 and hapilly folds it into a ConstantFP<1>. ISel then > blows up > because there's no pattern for it. > > Does this look familiar to anyone? I don't se...
2018 Feb 06
0
ConstantFP and Use
...ber right above it has the exact same assert, with the same message, leading me to suspect a cut-n-paste logical error. But let's assume for the moment the assert is ok. It's been there a long time and I've not been able to find other reports about it. In the asserting case, I have a ConstantFP node in a Use structure where the used value is from a load. This seems unusual to me. Why would a ConstantFP appear in a Use? It's a leaf node. I suspect this is the root of the problem but I wanted to check to make sure there wasn't some sublety about Use that would make ConstantFP...
2018 Jan 19
2
computeKnownBits doesn't handle ISD::ConstantFP
SelectionDAG's computeKnownBits has no case for ConstantFP, e.g. Known.ones = cast <ConstantFPSDNode>(Op)->getValueAFP ().bitcastToAPInt (); I can't easily override this in target specific code. Can anyone see an issue with submitting the patch to upstream? Suggestions for an in tree target that could trigger this would be very welcome. Che...
2008 Jun 10
1
[LLVMdev] regression? Or did I do something wrong again?
On Mon, 09 Jun 2008 21:25:42 +0200, Matthijs Kooijman wrote: > Hi Hendrik, > > It seems the ConstantFP method get might have been modified to take a > reference-to-APFloat, meaning you can't pass in APFloat(Value) anonymously. > You should either put it in a local variable, like > APFloat F(Val); > return ConstantFP::get(Type::DoubleTy, F); > which I _think_ is the right way to...