[backend] fix bugs of not

This commit is contained in:
rain2133
2025-06-25 02:24:45 +08:00
parent af1ad795ff
commit 24913641f2
2 changed files with 5 additions and 4 deletions

View File

@@ -343,6 +343,7 @@ std::any SysYIRGenerator::visitIfStmt(SysYParser::IfStmtContext *ctx) {
ctx->stmt(1)->accept(this);
module->leaveScope();
}
builder.createUncondBrInst(exitBlock, {});
BasicBlock::conectBlocks(builder.getBasicBlock(), exitBlock);
labelstring << "exit.L" << builder.getLabelIndex();