From 031f827da5457ed969bbf66e520105f9600a1229 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Sun, 15 Sep 2019 10:06:53 +0200 Subject: [PATCH] introduce another vinstr temp Some vinstrs are currently broken when using peephole optimization as they appear as writing to a temporary ssa output before being stored into their real destination, causing the store to be optimized out, but the generated code relies on having the destination as another temporary value available. Let's just add a 2nd temp to be used in those cases. Signed-off-by: Wolfgang Bumiller --- ir.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir.h b/ir.h index 42f6ce5..c81d1a2 100644 --- a/ir.h +++ b/ir.h @@ -249,7 +249,7 @@ ir_block* ir_function_create_block(lex_ctx_t ctx, ir_function*, const char /* builder */ #define IR_HT_SIZE 1024 -#define IR_MAX_VINSTR_TEMPS 1 +#define IR_MAX_VINSTR_TEMPS 2 struct ir_builder { ir_builder(const std::string& modulename); -- 2.39.2