podeti vishal
unread,Feb 1, 2021, 1:51:36 AM2/1/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to swiftshader
PackUnsigned for Short8 Reactor Types
Hi All,
I'm facing the below error when trying to use PackUnsigned with Short8
swiftshader/third_party/llvm-10.0/llvm/lib/IR/Instructions.cpp:400:
void llvm::CallInst::init(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, const llvm::Twine&):
Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed.
The underlying function which PackUnsigned is calling (packuswb_avx2) is as below :
RValue<Byte16> packuswb_avx2(RValue<Short8> x, RValue<Short8> y)
{
llvm::Function *packuswb = llvm::Intrinsic::getDeclaration(jit->module.get(), llvm::Intrinsic::x86_avx2_packuswb);
//RValue<Short8> dest = Short8();
//Value* v = V(jit->builder->CreateCall3(packuswb, ARGS(V(dest.value), V(x.value), V(y.value))));
return As<Byte16>(V(jit->builder->CreateCall2(packuswb, ARGS(V(x.value), V(y.value)))));
}
current.z = As<Short8>(PackUnsigned(current.x, current.z));
current.y = As<Short8>(PackUnsigned(current.y, current.y));
Can anyone please help ?