Displaying 3 results from an estimated 3 matches for "test3float".
2010 Jan 25
3
[LLVMdev] 64bit MRV problem: { float, float, float} -> { double, float }
Hey everybody,
I am struggling to get rid of a problem which seems to be related to a
multi-return value optimization:
I generate bitcode for a c++-function with llvm-g++ which is then
linked, transformed and optimized at runtime using LLVM. The function
has quite a few parameters, including structs and struct-pointers with 3
float fields.
The problem is, that I require the function to preserve
2010 Jan 25
2
[LLVMdev] 64bit MRV problem: { float, float, float} -> { double, float }
Uh, sorry, did not pay attention where I was replying ;)
Hey Duncan,
I do not understand why this behaviour is required. What is the problem
in having a function receive a single struct-parameter with three floats
compared to two scalar parameters?
source-code (C++):
struct Test3Float { float a, b, c; };
void test(Test3Float param, Test3Float* result) { ... }
bitcode:
%"struct.Test3Float" = type { float, float, float }
define void @_Z4test10Test3FloatPS_(double %param.0, float %param.1,
%"struct.Test3Float"* %result) { ... }
Best,
Ralf
Duncan Sands wrot...
2010 Jan 25
0
[LLVMdev] 64bit MRV problem: { float, float, float} -> { double, float }
Hi Ralf,
> I do not understand why this behaviour is required. What is the problem
> in having a function receive a single struct-parameter with three floats
> compared to two scalar parameters?
>
> source-code (C++):
> struct Test3Float { float a, b, c; };
> void test(Test3Float param, Test3Float* result) { ... }
if you compile this with GCC, you will see that it too passes the first two
floats in one double register, and the remaining float in a different register.
The GCC people didn't make this behaviour up, they are fo...