[llvm] [Scalarizer][DirectX] support structs return types (PR #111569)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 12:41:40 PDT 2024


================
@@ -699,6 +730,22 @@ bool ScalarizerVisitor::splitCall(CallInst &CI) {
   if (isVectorIntrinsicWithOverloadTypeAtArg(ID, -1))
     Tys.push_back(VS->SplitTy);
 
+  if (AreAllMatchingVectors) {
+    Type *PrevType = CallType->getContainedType(0);
+    for (unsigned I = 1; I < CallType->getNumContainedTypes(); I++) {
+      Type *CurrType = cast<FixedVectorType>(CallType->getContainedType(I));
+      if (PrevType != CurrType) {
----------------
farzonl wrote:

I would prefer to be more conservative. For one I don't think its necessary to relax this because any different component types should have been determined on the vectorized form of the intrinsic. Second, we don't need anything but an exact component match for our use case so why increase our test burden when it isn't necessary?

https://github.com/llvm/llvm-project/pull/111569


More information about the llvm-commits mailing list