Skip to content

Commit fdaa369

Browse files
committed
Update IsResRetType for vector overloads
1 parent 778db74 commit fdaa369

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/DXIL/DxilOperations.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6590,10 +6590,16 @@ Type *OP::GetFourI32Type() const { return m_pFourI32Type; }
65906590
Type *OP::GetFourI16Type() const { return m_pFourI16Type; }
65916591

65926592
bool OP::IsResRetType(llvm::Type *Ty) {
6593+
if (!Ty->isStructTy())
6594+
return false;
65936595
for (Type *ResTy : m_pResRetType) {
65946596
if (Ty == ResTy)
65956597
return true;
65966598
}
6599+
StructType *ST = cast<StructType>(Ty);
6600+
if (!ST->hasName() || ST->getNumContainedTypes() < 2)
6601+
return false;
6602+
return Ty == GetResRetType(ST->getContainedType(0));
65976603
return false;
65986604
}
65996605

0 commit comments

Comments
 (0)