<div dir="ltr"><span style="font-size:12.8000001907349px">I want to create a vector version sqrt as the following. </span><br><div><span style="font-size:12.8000001907349px"><br></span></div><div><div style><span style="font-size:12.8000001907349px">Value *Approx::CreateFSqrt(IRBuilder<> &builder, Value *v, const char* Name) {</span></div><div style><span style="font-size:12.8000001907349px">  Type *tys[] = {v->getType()};</span></div><div style><span style="font-size:12.8000001907349px">  Module* M = currF->getParent();</span></div><div style><span style="font-size:12.8000001907349px">  Value* sqrtv = Intrinsic::getDeclaration(M, Intrinsic::x86_sse2_sqrt_pd);</span></div><div style><span style="font-size:12.8000001907349px">  CallInst *CI = builder.CreateCall(sqrtv, v, Name);</span></div><div style><span style="font-size:12.8000001907349px"><br></span></div><div style><span style="font-size:12.8000001907349px">  return CI;</span></div><div style><span style="font-size:12.8000001907349px">}</span></div><div style="font-size:12.8000001907349px"><br></div></div><div style="font-size:12.8000001907349px">Here is Value *v is <2 x double></div><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">However, it outputs Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type! any idea?</span><br></div></div>