Skip to content

Commit b4783b9

Browse files
committed
Also compare gep type in IIA EqualGEPDescriptor
1 parent d482f4d commit b4783b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEInstInteractionAnalysis.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ bool IDEIIAFlowFact::operator==(const IDEIIAFlowFact &Other) const {
109109
}
110110
auto EqualGEPDescriptor = [](const llvm::GetElementPtrInst *Lhs,
111111
const llvm::GetElementPtrInst *Rhs) {
112-
return llvm::equal(Lhs->indices(), Rhs->indices());
112+
return Lhs->getSourceElementType() == Rhs->getSourceElementType() &&
113+
llvm::equal(Lhs->indices(), Rhs->indices());
113114
};
114115
for (unsigned Idx = 0; Idx < FieldDesc.size(); ++Idx) {
115116
if (!EqualGEPDescriptor(FieldDesc[Idx], Other.FieldDesc[Idx])) {

0 commit comments

Comments
 (0)