We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7897636 commit 197e0f5Copy full SHA for 197e0f5
llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp
@@ -588,10 +588,12 @@ bool SPIRVPrepareFunctions::removeAggregateTypesFromCalls(Function *F) {
588
SmallVector<std::pair<int, Type *>> ChangedTypes;
589
SmallVector<Type *> NewArgTypes;
590
591
- if (CB->getType()->isAggregateType())
592
- ChangedTypes.emplace_back(-1, CB->getType());
+ Type* RetTy = CB->getType();
+ if (RetTy->isAggregateType()) {
593
+ ChangedTypes.emplace_back(-1, RetTy);
594
+ RetTy = B.getInt32Ty();
595
+ }
596
- Type *RetTy = ChangedTypes.empty() ? CB->getType() : B.getInt32Ty();
597
for (auto &&Arg : CB->args()) {
598
if (Arg->getType()->isAggregateType()) {
599
NewArgTypes.push_back(B.getInt32Ty());
0 commit comments