File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -237,8 +237,14 @@ ir::IndexExpr::IndexType VerifyIndex(const ir::Expr &expr) {
237
237
: ir::IndexExpr::IndexType::kInvalid ;
238
238
}
239
239
case ir::IrNodeTy::Load: {
240
- return expr.type ().is_index_type () ? ir::IndexExpr::IndexType::kLoad
241
- : ir::IndexExpr::IndexType::kInvalid ;
240
+ if (!expr.type ().is_index_type ())
241
+ return ir::IndexExpr::IndexType::kInvalid ;
242
+ auto load = expr.As <ir::Load>();
243
+ for (const auto &indices : load->indices ) {
244
+ if (VerifyIndex (indices) == ir::IndexExpr::IndexType::kInvalid )
245
+ return ir::IndexExpr::IndexType::kInvalid ;
246
+ }
247
+ return ir::IndexExpr::IndexType::kLoad ;
242
248
}
243
249
case ir::IrNodeTy::Cast: {
244
250
ir::IndexExpr::IndexType result = VerifyIndex (expr->operand (0 ));
You can’t perform that action at this time.
0 commit comments