From 332d306723d74a222d635f0063003667408c40de Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 19 Aug 2012 17:42:22 +0200 Subject: [PATCH] for void returning functions we can use store_return to avoid a useless store after it --- ir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir.c b/ir.c index 26aec5c..cc0aa10 100644 --- a/ir.c +++ b/ir.c @@ -1225,7 +1225,7 @@ ir_instr* ir_block_create_call(ir_block *self, const char *label, ir_value *func in = ir_instr_new(self, INSTR_CALL0); if (!in) return NULL; - out = ir_value_out(self->owner, label, store_value, func->outtype); + out = ir_value_out(self->owner, label, (func->outtype == TYPE_VOID) ? store_return : store_value, func->outtype); if (!out) { ir_instr_delete(in); return NULL; -- 2.39.2