Skip to content

Commit aa2eaeb

Browse files
committed
correctly check for visited md
1 parent adfcecf commit aa2eaeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/SYCLLowerIR/LocalAccessorToSharedMemory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,11 @@ class LocalAccessorToSharedMemory : public ModulePass {
253253
// the same metadata, recognise visited ones.
254254
SmallSet<MDNode *, 4> Visited;
255255
for (auto *MetadataNode : NvvmMetadata->operands()) {
256-
Visited.insert(MetadataNode);
257256
if (Visited.contains(MetadataNode) || MetadataNode->getNumOperands() != 3)
258257
continue;
259258

259+
Visited.insert(MetadataNode);
260+
260261
// NVPTX identifies kernel entry points using metadata nodes of the form:
261262
// !X = !{<function>, !"kernel", i32 1}
262263
const MDOperand &TypeOperand = MetadataNode->getOperand(1);

0 commit comments

Comments
 (0)