Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9f20350

Browse files
authored
[AMDGPU] Fix AMDGPULowerKernelAttributes not invalidating analysis (#175256)
Summary: The new PM wasn't using the changed result which triggered failures after #174112
1 parent cd81aae commit 9f20350

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,12 +430,14 @@ AMDGPULowerKernelAttributesPass::run(Function &F, FunctionAnalysisManager &AM) {
430430
if (!BasePtr) // ImplicitArgPtr/DispatchPtr not used.
431431
return PreservedAnalyses::all();
432432

433+
bool Changed = false;
433434
for (Instruction &I : instructions(F)) {
434435
if (CallInst *CI = dyn_cast<CallInst>(&I)) {
435436
if (CI->getCalledFunction() == BasePtr)
436-
processUse(CI, IsV5OrAbove);
437+
Changed |= processUse(CI, IsV5OrAbove);
437438
}
438439
}
439440

440-
return PreservedAnalyses::all();
441+
return !Changed ? PreservedAnalyses::all()
442+
: PreservedAnalyses::none().preserveSet<CFGAnalyses>();
441443
}

0 commit comments

Comments
 (0)