Force memset instead of store zeroinitializer when the value is large

This commit is contained in:
gingerBill
2022-07-24 20:22:50 +01:00
parent c8ab1b7ee1
commit e6ab4f4856
4 changed files with 19 additions and 8 deletions
+2 -1
View File
@@ -2082,7 +2082,8 @@ void lb_build_stmt(lbProcedure *p, Ast *node) {
lbAddr lval = {};
if (!is_blank_ident(name)) {
Entity *e = entity_of_node(name);
bool zero_init = true; // Always do it
// bool zero_init = true; // Always do it
bool zero_init = vd->values.count == 0;
lval = lb_add_local(p, e->type, e, zero_init);
}
array_add(&lvals, lval);