search for: ptr_y

Displaying 6 results from an estimated 6 matches for "ptr_y".

Did you mean: ptr_0
2008 May 20
2
[LLVMdev] Making use of SSE intrinsics
...e 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-point values as a vector of integers (for instance to extract the sign, exponent and/or mantissa bits). Any infor...
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* rcpps = Intrinsic::getDeclaration(Module, Intrinsic::x86_sse_rcp_ps); Value* y = Builder.CreateCall(rcpps, x); Builder.Crea...
2008 May 08
0
[LLVMdev] Vector code
...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_z, false, label_entry); GetElementPtrInst* ptr_tmp10 = new GetElementPtrInst(ptr_x...
2008 May 08
2
[LLVMdev] Vector code
...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_z, false, > label_entry); > GetElementPtrInst* ptr_t...
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
...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_z, false, > label_entry); > GetElementPtrInst* ptr_t...