[ARITH] Simplify casts of constants 0 and 1 (#3758)
authorSergei Grechanik <grechanik.sergey@huawei.com>
Tue, 13 Aug 2019 15:28:28 +0000 (18:28 +0300)
committerTianqi Chen <tqchen@users.noreply.github.com>
Tue, 13 Aug 2019 15:28:28 +0000 (08:28 -0700)
commitbbc5d15358b0d3c3d73397da48d02b921366123e
tree7b7a5b17fc9c744324e561928be8817543023f7b
parent8bd9d4d5edf0a17ef0726166710024c3147def68
 [ARITH] Simplify casts of constants 0 and 1 (#3758)

* [ARITH] Simplify casts of constants 0 and 1

* [EXPR] is_const_value to check whether non-ints are consts

* Revert "[EXPR] is_const_value to check whether non-ints are consts"

This reverts commit 7e1b3462e3f74fd0afb1541d72978107cfa23c30.

* Use tvm::cast
src/arithmetic/rewrite_simplify.cc
src/arithmetic/rewrite_simplify.h
src/lang/expr_operator.cc
tests/python/unittest/test_arith_rewrite_simplify.py