[llvm] [Scalarizer][DirectX] support structs return types (PR #111569)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 14:01:19 PDT 2024
================
@@ -699,6 +728,18 @@ bool ScalarizerVisitor::splitCall(CallInst &CI) {
if (isVectorIntrinsicWithOverloadTypeAtArg(ID, -1))
Tys.push_back(VS->SplitTy);
+ if (AreAllVectors) {
+ Type *PrevType = CallType->getContainedType(0);
+ Type *CallType = CI.getType();
+ for (unsigned I = 1; I < CallType->getNumContainedTypes(); I++) {
+ Type *CurrType = cast<FixedVectorType>(CallType->getContainedType(I));
+ if (PrevType != CurrType) {
+ std::optional<VectorSplit> CurrVS = getVectorSplit(CurrType);
+ Tys.push_back(CurrVS->SplitTy);
----------------
farzonl wrote:
I’ve never seen the `if (Split.NumPacked >= NumElems)` case be true. But sure you are right. We could add an assert or return false?
https://github.com/llvm/llvm-project/pull/111569
More information about the llvm-commits
mailing list