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

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 16:06:32 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();
----------------
farzonl wrote:

Nice catch, this is left over from a previous version where`CallType`  was `CI.getType()` or `CI.getType()->getContainedType(0);` and for this case I needed the struct to iterate over. Later change I inited VS as `getVectorSplit(CallType);` or `VS(getVectorSplit(CallType->getContainedType(0));` and thus didn't need to do this, but forgot to remove it.

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


More information about the llvm-commits mailing list