We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a000e56 commit 6931630Copy full SHA for 6931630
llvm/lib/SYCLLowerIR/SYCLJointMatrixTransform.cpp
@@ -247,13 +247,13 @@ bool propagateConstexprLayout(Function *F) {
247
// and keep track if we have removed them before to avoid double free().
248
SmallPtrSet<Instruction *, 8> Erased;
249
for (Instruction *II : ToErase) {
250
- if (!II->use_empty())
251
- continue;
252
if (Erased.contains(II))
253
continue;
+ if (!II->use_empty())
+ continue;
254
+ Erased.insert(II);
255
II->dropAllReferences();
256
II->eraseFromParent();
- Erased.insert(II);
257
}
258
return !ToErase.empty();
259
0 commit comments