Commit 1cc349ed authored by lxq's avatar lxq

fix a tiny bug

parent dd4ade94
......@@ -36,6 +36,8 @@ RegAllocator::no_reg_alloca(Value *v) {
else if (instr->is_zext()) { // only alloca for true use
bool alloc;
ASSERT_CMPINST_USED_ONCE(instr);
if (instr->get_use_list().size() == 0)
return false;
auto use_ins = dynamic_cast<Instruction *>(
instr->get_use_list().begin()->val_);
// assert(use_ins != nullptr && "should only be instruction?");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment