]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
MUL_VF and MUL_FV get their special life-range handling
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 22 Aug 2012 16:51:32 +0000 (18:51 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 22 Aug 2012 16:51:32 +0000 (18:51 +0200)
ir.c

diff --git a/ir.c b/ir.c
index dff566e94a687410840b13d557cc6368f5d54768..47b9adc7798125536cf83969e61468da5068c2c8 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -2109,6 +2109,19 @@ static bool ir_block_life_propagate(ir_block *self, ir_block *prev, bool *change
         /* See which operands are read and write operands */
         ir_op_read_write(instr->opcode, &read, &write);
 
+        if (instr->opcode == INSTR_MUL_VF)
+        {
+            /* the float source will get an additional lifetime */
+            tempbool = ir_value_life_merge(instr->_ops[2], instr->eid+1);
+            *changed = *changed || tempbool;
+        }
+        else if (instr->opcode == INSTR_MUL_FV)
+        {
+            /* the float source will get an additional lifetime */
+            tempbool = ir_value_life_merge(instr->_ops[1], instr->eid+1);
+            *changed = *changed || tempbool;
+        }
+
         /* Go through the 3 main operands */
         for (o = 0; o < 3; ++o)
         {