Skip to content

Commit

Permalink
Handle Select in IntSetEvaluator (apache#2687)
Browse files Browse the repository at this point in the history
  • Loading branch information
derisavi authored and wweic committed Mar 12, 2019
1 parent fad2597 commit 6fee9f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/arithmetic/int_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 6fee9f6

Please sign in to comment.