[AMDGPU] Fix AMDGPULowerKernelAttributes not invalidating analysis (#175256)
Summary: The new PM wasn't using the changed result which triggered failures after https://github.com/llvm/llvm-project/pull/174112
This commit is contained in:
parent
cd81aae57a
commit
9f203509ce
@ -430,12 +430,14 @@ AMDGPULowerKernelAttributesPass::run(Function &F, FunctionAnalysisManager &AM) {
|
||||
if (!BasePtr) // ImplicitArgPtr/DispatchPtr not used.
|
||||
return PreservedAnalyses::all();
|
||||
|
||||
bool Changed = false;
|
||||
for (Instruction &I : instructions(F)) {
|
||||
if (CallInst *CI = dyn_cast<CallInst>(&I)) {
|
||||
if (CI->getCalledFunction() == BasePtr)
|
||||
processUse(CI, IsV5OrAbove);
|
||||
Changed |= processUse(CI, IsV5OrAbove);
|
||||
}
|
||||
}
|
||||
|
||||
return PreservedAnalyses::all();
|
||||
return !Changed ? PreservedAnalyses::all()
|
||||
: PreservedAnalyses::none().preserveSet<CFGAnalyses>();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user