Skip to content

Commit 56afa1e

Browse files
authored
Only mutate callsites with a mutated callee
1 parent ebca521 commit 56afa1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,8 @@ SPIRVPrepareFunctions::removeAggregateTypesFromSignature(Function *F) {
544544
std::move(ChangedTypes), NewF->getName());
545545

546546
for (auto *U : make_early_inc_range(F->users())) {
547-
if (auto *CI = dyn_cast<CallInst>(U))
547+
if (CallInst *CI;
548+
(CI = dyn_cast<CallInst>(U)) && CI->getCalledFunction() == F)
548549
CI->mutateFunctionType(NewF->getFunctionType());
549550
if (auto *C = dyn_cast<Constant>(U))
550551
C->handleOperandChange(F, NewF);

0 commit comments

Comments
 (0)