未验证 提交 149e43e0 编写于 作者: E Egor Bogatov 提交者: GitHub

fix addrmode assert (#84252)

上级 a1954cce
......@@ -4472,7 +4472,10 @@ bool Compiler::gtMarkAddrMode(GenTree* addr, int* pCostEx, int* pCostSz, var_typ
op2op1->gtFlags |= GTF_ADDRMODE_NO_CSE;
op2op1 = op2op1->AsOp()->gtOp1;
}
assert(op1->gtEffectiveVal() == base);
// if genCreateAddrMode reported base as nullptr it means that op1 is effectively null address
assert((op1->gtEffectiveVal() == base) ||
(base == nullptr && op1->gtEffectiveVal()->IsIntegralConst(0)));
assert(op2op1 == idx);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册