Reviewed By: Groverkss
Differential Revision: https://reviews.llvm.org/
D127466
/// A point is contained in the union iff any of the parts contain the point.
bool PresburgerRelation::containsPoint(ArrayRef<int64_t> point) const {
return llvm::any_of(disjuncts, [&](const IntegerRelation &disjunct) {
- return (disjunct.containsPoint(point));
+ return (disjunct.containsPointNoLocal(point));
});
}
EXPECT_FALSE(setB.containsPoint({x, y}));
}
}
+
+ // The PresburgerSet has only one id, x, so we supply one value.
+ EXPECT_TRUE(PresburgerSet(parsePoly("(x) : (x - 2*(x floordiv 2) == 0)"))
+ .containsPoint({0}));
}
TEST(SetTest, Union) {