Skip to content

Commit 53f1e4b

Browse files
dm-vodopyanovKornevNikita
authored andcommitted
[SYCL] Fix warnings in SYCLConditionalCallOnDevice pass (#16624)
1 parent bb7eca4 commit 53f1e4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/SYCLLowerIR/SYCLConditionalCallOnDevice.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ SYCLConditionalCallOnDevicePass::run(Module &M, ModuleAnalysisManager &) {
5353
// (FAction). FAction should be a literal (i.e. not a pointer). The
5454
// structure of the header file ensures that there is exactly one such
5555
// instruction.
56-
bool CallFound = false;
56+
[[maybe_unused]] bool CallFound = false;
5757
for (Instruction &I : instructions(FCaller)) {
5858
if (auto *CI = dyn_cast<CallInst>(&I);
5959
CI && (Intrinsic::IndependentIntrinsics::not_intrinsic ==
@@ -121,8 +121,8 @@ SYCLConditionalCallOnDevicePass::run(Module &M, ModuleAnalysisManager &) {
121121
Args.push_back(Call->getArgOperand(I));
122122

123123
// Create the new call instruction
124-
auto *NewCall =
125-
CallInst::Create(NewFCaller, Args, /* NameStr = */ "", Call);
124+
auto *NewCall = CallInst::Create(NewFCaller, Args, /* NameStr = */ "",
125+
Call->getIterator());
126126
NewCall->setCallingConv(Call->getCallingConv());
127127
NewCall->setDebugLoc(Call->getDebugLoc());
128128

0 commit comments

Comments
 (0)