From 3f5305af586ebd3505a870f8e599b610144e64e9 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 22 Jun 2017 08:44:35 +0200 Subject: [PATCH] ir: fix vector negation using the nil value We cannot use OFS_NULL as it is only a single value and overlaps with OFS_RETURN. --- ir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir.cpp b/ir.cpp index 5df1244..7a2583b 100644 --- a/ir.cpp +++ b/ir.cpp @@ -1643,7 +1643,7 @@ ir_value* ir_block_create_unary(ir_block *self, lex_ctx_t ctx, case VINSTR_NEG_F: return ir_block_create_general_instr(self, ctx, label, INSTR_SUB_F, nullptr, operand, ot); case VINSTR_NEG_V: - return ir_block_create_general_instr(self, ctx, label, INSTR_SUB_V, nullptr, operand, TYPE_VECTOR); + return ir_block_create_general_instr(self, ctx, label, INSTR_SUB_V, self->m_owner->m_owner->m_nil, operand, TYPE_VECTOR); default: ot = operand->m_vtype; -- 2.39.2