masahi commented on a change in pull request #7354:
URL: https://github.com/apache/tvm/pull/7354#discussion_r565769392
##########
File path: src/relay/transforms/fold_constant.cc
##########
@@ -120,6 +120,18 @@ class ConstantFolder : public MixedModeMutator {
}
}
+ Expr VisitExpr_(const IfNode* op) final {
+ auto new_cond = ExprMutator::VisitExpr(op->cond);
+ if (auto const_cond = new_cond.as<ConstantNode>()) {
+ if (reinterpret_cast<uint8_t*>(const_cond->data->data)[0]) {
Review comment:
there is no representation of `bool*`, things need to be byte-addressable
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]