diff --git a/HalideIR b/HalideIR index cb3c025d5b91..d91cf97d5d6c 160000 --- a/HalideIR +++ b/HalideIR @@ -1 +1 @@ -Subproject commit cb3c025d5b91ab994b063a85bc935fc364d8f491 +Subproject commit d91cf97d5d6cd2b47ec408bb08e978b88cbf6ab7 diff --git a/Makefile b/Makefile index c67d5e845334..b07fe4b5b857 100644 --- a/Makefile +++ b/Makefile @@ -225,7 +225,7 @@ lib/libtvm_web_runtime.js: lib/libtvm_web_runtime.bc $(LIB_HALIDEIR): LIBHALIDEIR LIBHALIDEIR: - + cd HalideIR; make lib/libHalideIR.a ; cd $(ROOTDIR) + + cd HalideIR; make lib/libHalideIR.a DMLC_CORE_PATH=../dmlc-core; cd $(ROOTDIR) cpplint: python dmlc-core/scripts/lint.py topi cpp topi/include; diff --git a/src/arithmetic/canonical.cc b/src/arithmetic/canonical.cc index 518e7b3587b7..933a8f78ea16 100644 --- a/src/arithmetic/canonical.cc +++ b/src/arithmetic/canonical.cc @@ -302,6 +302,13 @@ class Canonical::Internal : public IRMutator { Expr Mutate_(const Mod* op, const Expr& e) final { return Binary(op, e); } + Expr Mutate_(const And* op, const Expr& e) final { + Expr expr = IRMutator::Mutate_(op, e); + op = expr.as(); + if (is_one(op->a)) return op->b; + if (is_one(op->b)) return op->a; + return expr; + } // Call Expr Mutate_(const Call* op, const Expr& e) final { if (!op->is_pure()) {