Skip to content

Commit fb1d712

Browse files
authored
[SYCL][NATIVECPU] Fix unused condition (#11161)
Update `ModuleChange` variable in the loop, so the condition is not always falling to "false" branch
1 parent 4d0c552 commit fb1d712

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/SYCLLowerIR/RenameKernelSYCLNativeCPU.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RenameKernelSYCLNativeCPUPass::run(Module &M, ModuleAnalysisManager &MAM) {
2222
for (auto &F : M) {
2323
if (F.hasFnAttribute(sycl::utils::ATTR_SYCL_MODULE_ID)) {
2424
F.setName(sycl::utils::addSYCLNativeCPUSuffix(F.getName()));
25+
ModuleChanged |= true;
2526
}
2627
}
2728
return ModuleChanged ? PreservedAnalyses::none() : PreservedAnalyses::all();

0 commit comments

Comments
 (0)