// register by OpCompositeConstruct. And we can't claim, that the Result type
// of OpCompositeConstruct instruction is always the joint matrix type, it's
// simply not true.
- if (MangledName == "__spirv_JointMatrixINTEL") {
+ if (MangledName == "__spirv_JointMatrixINTEL" && !ST->isOpaquePointerTy()) {
auto *PtrTy = dyn_cast<PointerType>(ST->getElementType(0));
assert(PtrTy &&
"Expected a pointer to an array to represent joint matrix type");
std::vector<size_t> TypeLayout;
- ArrayType *ArrayTy = dyn_cast<ArrayType>(PtrTy->getPointerElementType());
+ ArrayType *ArrayTy =
+ dyn_cast<ArrayType>(PtrTy->getNonOpaquePointerElementType());
assert(ArrayTy && "Expected a pointer element type of an array type to "
"represent joint matrix type");
TypeLayout.push_back(ArrayTy->getNumElements());