Displaying 6 results from an estimated 6 matches for "ptr_x".
Did you mean:
pte_x
2008 May 20
2
[LLVMdev] Making use of SSE intrinsics
...reciprocal. I've noticed that
LLVM supports intrinsics, but I couldn't find any information on how to use
them. I've tried digging through the LLVM-GCC code but it's just too complex
for me. I would be very grateful if someone could complete this code:
LoadInst *x = new LoadInst(ptr_x, "", false, basicBlock);
// y = rcpps(x) // FIXME
StoreInst *storeResult = new StoreInst(y, ptr_y, false, basicBlock);
Somewhat related to this, I'd also like to know how to 'reinterpret_cast'
values. It can be quite useful to sometimes interpret a vector of
floating-p...
2008 May 20
0
[LLVMdev] Making use of SSE intrinsics
On Tue, May 20, 2008 at 5:03 AM, Nicolas Capens <nicolas at capens.net> wrote:
> LoadInst *x = new LoadInst(ptr_x, "", false, basicBlock);
>
> // y = rcpps(x) // FIXME
> StoreInst *storeResult = new StoreInst(y, ptr_y, false, basicBlock);
Using an IRBuilder, something like the following (uncompiled, but it's
at least approximately right):
Value* x = Builder.CreateLoad(ptr_x);
Function...
2008 May 08
0
[LLVMdev] Vector code
...he result). :-)
Here's essentially what I try to generate:
void add(float z[4], float x[4], float y[4])
{
z[0] = x[0] + y[0];
z[1] = x[1] + y[1];
z[2] = x[2] + y[2];
z[3] = x[3] + y[3];
}
And here's part of the output from the online demo:
LoadInst* float_tmp2 = new LoadInst(ptr_x, "tmp2", false, label_entry);
LoadInst* float_tmp5 = new LoadInst(ptr_y, "tmp5", false, label_entry);
BinaryOperator* float_tmp6 = BinaryOperator::create(Instruction::Add,
float_tmp2, float_tmp5, "tmp6", label_entry);
StoreInst* void_20 = new StoreInst(float_tmp6, ptr_...
2008 May 08
2
[LLVMdev] Vector code
...generate:
>
> void add(float z[4], float x[4], float y[4])
> {
> z[0] = x[0] + y[0];
> z[1] = x[1] + y[1];
> z[2] = x[2] + y[2];
> z[3] = x[3] + y[3];
> }
>
> And here's part of the output from the online demo:
>
> LoadInst* float_tmp2 = new LoadInst(ptr_x, "tmp2", false,
> label_entry);
> LoadInst* float_tmp5 = new LoadInst(ptr_y, "tmp5", false,
> label_entry);
> BinaryOperator* float_tmp6 = BinaryOperator::create(Instruction::Add,
> float_tmp2, float_tmp5, "tmp6", label_entry);
> StoreInst* void_2...
2008 May 08
3
[LLVMdev] Vector code
Hi Nicolas (at least, I suspect your signing of your mail with "Anton" was not
intentional :-p),
> I assume that's the same as the online demo's "Show LLVM C++ API code"
> option (http://llvm.org/demo/)? I've tried that with a structure containing
> four floating-point components but it also appears to add them individually
> using extract/insert. Maybe
2008 May 09
0
[LLVMdev] Vector code
...generate:
>
> void add(float z[4], float x[4], float y[4])
> {
> z[0] = x[0] + y[0];
> z[1] = x[1] + y[1];
> z[2] = x[2] + y[2];
> z[3] = x[3] + y[3];
> }
>
> And here's part of the output from the online demo:
>
> LoadInst* float_tmp2 = new LoadInst(ptr_x, "tmp2", false,
> label_entry);
> LoadInst* float_tmp5 = new LoadInst(ptr_y, "tmp5", false,
> label_entry);
> BinaryOperator* float_tmp6 = BinaryOperator::create(Instruction::Add,
> float_tmp2, float_tmp5, "tmp6", label_entry);
> StoreInst* void_2...