Skip to content

Commit e539b57

Browse files
yuri91alexp-sssup
authored andcommitted
ICF: support comparing metadata values
We declare them not equivalent unless they are the same value
1 parent 53a12fd commit e539b57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/CheerpUtils/IdenticalCodeFolding.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,9 @@ bool IdenticalCodeFolding::equivalentOperand(const llvm::Value* A, const llvm::V
614614
return false;
615615
return a->getArgNo() == b->getArgNo();
616616
}
617+
if (isa<MetadataAsValue>(A) || isa<MetadataAsValue>(B)) {
618+
return A == B;
619+
}
617620

618621
#ifndef NDEBUG
619622
A->dump();

0 commit comments

Comments
 (0)