Skip to content

Commit

Permalink
Also compare gep type in IIA EqualGEPDescriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianbs96 committed Aug 9, 2024
1 parent d482f4d commit b4783b9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ bool IDEIIAFlowFact::operator==(const IDEIIAFlowFact &Other) const {
}
auto EqualGEPDescriptor = [](const llvm::GetElementPtrInst *Lhs,
const llvm::GetElementPtrInst *Rhs) {
return llvm::equal(Lhs->indices(), Rhs->indices());
return Lhs->getSourceElementType() == Rhs->getSourceElementType() &&
llvm::equal(Lhs->indices(), Rhs->indices());
};
for (unsigned Idx = 0; Idx < FieldDesc.size(); ++Idx) {
if (!EqualGEPDescriptor(FieldDesc[Idx], Other.FieldDesc[Idx])) {
Expand Down

0 comments on commit b4783b9

Please sign in to comment.