Displaying 7 results from an estimated 7 matches for "currf".
Did you mean:
curr
2015 Apr 16
3
[LLVMdev] double* to <2 x double>*
..., i32
%i.021
%1 = bitcast double* %arrayidx1 to <2 x double>*
%2 = load <2 x double>* %1, align 4
what I right now doing is:
*Assume pInst is *%1 = load double* %arrayidx1, align 4, !tbaa !0
Value *loadValue = pInst->getOperand(0);
Type *vecTy = VectorType::get(Type::getDoublePtrTy(currF->getContext()), 2);
Value *emptyVec = UndefValue::get(vecTy);
Type* u32Ty = Type::getInt32Ty(currF->getContext());
Value *index0 = ConstantInt::get(u32Ty, 0);
Value *index1 = ConstantInt::get(u32Ty, 1);
Instruction *InsertVal = InsertElementInst::Create(emptyVec, loadValue,
index0, "&...
2015 Apr 18
2
[LLVMdev] how can I create an SSE instrinsics sqrt?
I want to create a vector version sqrt as the following.
Value *Approx::CreateFSqrt(IRBuilder<> &builder, Value *v, const char*
Name) {
Type *tys[] = {v->getType()};
Module* M = currF->getParent();
Value* sqrtv = Intrinsic::getDeclaration(M, Intrinsic::x86_sse2_sqrt_pd);
CallInst *CI = builder.CreateCall(sqrtv, v, Name);
return CI;
}
Here is Value *v is <2 x double>
However, it outputs Assertion `isa<X>(Val) && "cast<Ty>() argument of
in...
2015 Apr 18
2
[LLVMdev] how can I create an SSE instrinsics sqrt?
...w can I create an SSE instrinsics sqrt?
>
>
>
> I want to create a vector version sqrt as the following.
>
>
>
> Value *Approx::CreateFSqrt(IRBuilder<> &builder, Value *v, const char*
> Name) {
>
> Type *tys[] = {v->getType()};
>
> Module* M = currF->getParent();
>
> Value* sqrtv = Intrinsic::getDeclaration(M, Intrinsic::x86_sse2_sqrt_pd);
>
> CallInst *CI = builder.CreateCall(sqrtv, v, Name);
>
>
>
> return CI;
>
> }
>
>
>
> Here is Value *v is <2 x double>
>
> However, it outputs...
2015 Apr 15
1
[LLVMdev] How to do bitcast for double to <2 x double>
...Instruction* ScalarToVectorLoad(Instruction* pInst) {
> Value *loadValue = pInst->getOperand(0);
> Instruction *newLoad; //this one should be 2% = load < 2 x double>* %1
>
> BitCastInst *scalarToVector = new BitCastInst(loadValue,
> VectorType::get(Type::getDoubleTy(currF->getContext()), 2),
> "vectorizedLoad", pInst);
> newLoad = new LoadInst(); //to be implemented...
> return newLoad;
> }
>
> On Wed, Apr 15, 2015 at 1:03 PM, mats petersson <mats at planetcatfish.com>
> wrote:
>>
>> Create a type that is a &qu...
2015 Apr 15
2
[LLVMdev] How to do bitcast for double to <2 x double>
How can I write code to generate IR for:
%2 = bitcast double* %1 to <2 x double>*.
%3 = load <2 x double>* %2, align 16
Basically, it is similar to x86 _mm_load_pd1 intrinsics.
Thanks,
Zhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150415/66489860/attachment.html>
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...ease go over the following instruction and see
what wrong with it? Thanks for your time again.
Value *vecVal = NULL;
IRBuilder<> builder(&*pInst);
Type *vecTy = VectorType::get(Type::getDoubleTy(ctxt), 2);
Value *emptyVec = UndefValue::get(vecTy);
Type* u32Ty = Type::getInt32Ty(currF->getContext());
Value *index0 = ConstantInt::get(u32Ty, 0);
Value *index1 = ConstantInt::get(u32Ty, 1);
Instruction *InsertVal = InsertElementInst::Create(emptyVec, oprnd,
index0, "insert");
InsertVal = InsertElementInst::Create(emptyVec, oprnd, index1, "insert")...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
I got it. Thanks, Nick. So, it is back to the previous problem. If I have
the following instruction:
%3 = fadd double %1, double %2
I want to change it into
%6 = fadd <2 x double> %4, double %5
where %4 = <double %1, double %1>, %5 = <double %2, double %2>, how can I
do this?
Thanks,
Best
On Fri, Apr 17, 2015 at 1:56 AM, Nick Lewycky <nicholas at mxc.ca> wrote:
>