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) {
237237 : ir::IndexExpr::IndexType::kInvalid ;
238238 }
239239 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 ;
242248 }
243249 case ir::IrNodeTy::Cast: {
244250 ir::IndexExpr::IndexType result = VerifyIndex (expr->operand (0 ));
You can’t perform that action at this time.
0 commit comments