Displaying 4 results from an estimated 4 matches for "convertdoubletoint64".
2011 Sep 22
2
[LLVMdev] Need help in converting int to double
...= mBuilder.CreateStructGEP(secondArg, 0);
> rhs = mBuilder.CreateLoad(rhs);
> rhs = mBuilder.CreatePointerCast(rhs, PointerType::get(
> mBuilder.getInt64Ty(), 0));
>
> lhs = mBuilder.CreateLoad(lhs);
> rhs = mBuilder.CreateLoad(rhs);
>
> lhs = convertDoubleToInt64(lhs); // used FPToSI
> rhs = convertDoubleToInt64(rhs);// " "
>
> //lhs = mBuilder.CreateLoad(lhs);
> //rhs = mBuilder.CreateLoad(rhs);
>
> lhs = mBuilder.CreateShl(lhs, rhs);
> //lhs = mBuilder.CreatePointerCast(lhs,
> PointerType::g...
2011 Sep 22
0
[LLVMdev] Need help in converting int to double
...it...
You are doing this, in LLVM IR:
%0 = getelementptr %Value* %firstArg, i32 0 ; i8**
%1 = load i8** %0 ; i8*
%2 = bitcast i8* %1 to i64*
%3 = getelementptr %Value* %secondArg, i32 0 ; i8**
%4 = load i8** %3; i8*
%5 = bitcast i8* %4 to i64*
%6 = load i64* %2
%7 = load i64* %5
Then you call convertDoubleToInt64(). What does this actually do?
It's in trouble by this point because it needs to do a fptosi on a double operand, but you've got an i64 operand and you can't reinterpret-cast ints to floats in LLVM IR (AFAIK)
I can't see what your code is doing afterwards as it uses calls to helpe...
2011 Sep 22
1
[LLVMdev] Need help in converting int to double
...t; %2 = bitcast i8* %1 to i64*****
>
> %3 = getelementptr %Value* %secondArg, i32 0 ; i8******
>
> %4 = load i8** %3; i8*****
>
> %5 = bitcast i8* %4 to i64*****
>
> ** **
>
> %6 = load i64* %2****
>
> %7 = load i64* %5****
>
> ** **
>
> Then you call convertDoubleToInt64(). What does this actually do?****
>
> It’s in trouble by this point because it needs to do a fptosi on a double
> operand, but you’ve got an i64 operand and you can’t reinterpret-cast ints
> to floats in LLVM IR (AFAIK)****
>
> ** **
>
> I can’t see what your code is doing...
2011 Sep 22
3
[LLVMdev] Need help in converting int to double
Hi,
I'm pursuing M.Tech course. As a part of the project work i'm using
LLVM as back-end. My project area is "Enhancing the performance of V8
javascript engine using LLVM as a back-end".
Now i'm writing code for shift left(SHL) operator. I had my own Value
Structure .. it's like this
Struct Value
{
void *val ;
char type;
}
The "char type" holds