From 511b50dd2e20b3f03f60e42ea0a49fb5131bb3ec Mon Sep 17 00:00:00 2001 From: Dmitry Vodopyanov Date: Tue, 14 Jan 2025 06:21:50 -0800 Subject: [PATCH] [SYCL] Fix warnings in SYCLConditionalCallOnDevice pass --- llvm/lib/SYCLLowerIR/SYCLConditionalCallOnDevice.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/SYCLLowerIR/SYCLConditionalCallOnDevice.cpp b/llvm/lib/SYCLLowerIR/SYCLConditionalCallOnDevice.cpp index b226437709b93..5620b068a062e 100644 --- a/llvm/lib/SYCLLowerIR/SYCLConditionalCallOnDevice.cpp +++ b/llvm/lib/SYCLLowerIR/SYCLConditionalCallOnDevice.cpp @@ -53,7 +53,7 @@ SYCLConditionalCallOnDevicePass::run(Module &M, ModuleAnalysisManager &) { // (FAction). FAction should be a literal (i.e. not a pointer). The // structure of the header file ensures that there is exactly one such // instruction. - bool CallFound = false; + [[maybe_unused]] bool CallFound = false; for (Instruction &I : instructions(FCaller)) { if (auto *CI = dyn_cast(&I); CI && (Intrinsic::IndependentIntrinsics::not_intrinsic == @@ -121,8 +121,8 @@ SYCLConditionalCallOnDevicePass::run(Module &M, ModuleAnalysisManager &) { Args.push_back(Call->getArgOperand(I)); // Create the new call instruction - auto *NewCall = - CallInst::Create(NewFCaller, Args, /* NameStr = */ "", Call); + auto *NewCall = CallInst::Create(NewFCaller, Args, /* NameStr = */ "", + Call->getIterator()); NewCall->setCallingConv(Call->getCallingConv()); NewCall->setDebugLoc(Call->getDebugLoc());