From 33d652d38cc8544ea6704623f4753e44749daf74 Mon Sep 17 00:00:00 2001 From: Salem Derisavi Date: Wed, 27 Feb 2019 17:01:54 -0500 Subject: [PATCH] Handle Select in IntSetEvaluator (#2687) --- src/arithmetic/int_set.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/arithmetic/int_set.cc b/src/arithmetic/int_set.cc index 1136cf0b1206..ed6e55904cdd 100644 --- a/src/arithmetic/int_set.cc +++ b/src/arithmetic/int_set.cc @@ -531,6 +531,11 @@ class IntSetEvaluator : CHECK(eval_vec_); return Eval(op->value); } + IntSet VisitExpr_(const Select* op, const Expr& e) final { + IntSet true_set = this->Eval(op->true_value); + IntSet false_set = this->Eval(op->false_value); + return Union({false_set, true_set}); + } IntSet VisitExprDefault_(const Node* op, const Expr& e) final { LOG(WARNING) << "cannot evaluate set type " << e->type_key(); return IntSet::everything();