Ensure that the members[] array is filled for vector types so the liferange function can use all of them

This commit is contained in:
Wolfgang Bumiller 2012-12-24 12:52:15 +01:00
parent fcdff3180a
commit 307746dc35

9
ir.c
View file

@ -3240,8 +3240,12 @@ static bool ir_builder_gen_global(ir_builder *self, ir_value *global, bool isloc
case TYPE_FIELD:
if (pushdef) {
vec_push(code_defs, def);
if (global->fieldtype == TYPE_VECTOR)
if (global->fieldtype == TYPE_VECTOR) {
gen_vector_defs(def, global->name);
ir_value_vector_member(global, 0);
ir_value_vector_member(global, 1);
ir_value_vector_member(global, 2);
}
}
return gen_global_field(global);
case TYPE_ENTITY:
@ -3277,6 +3281,9 @@ static bool ir_builder_gen_global(ir_builder *self, ir_value *global, bool isloc
case TYPE_VECTOR:
{
size_t d;
ir_value_vector_member(global, 0);
ir_value_vector_member(global, 1);
ir_value_vector_member(global, 2);
ir_value_code_setaddr(global, vec_size(code_globals));
if (global->hasvalue) {
iptr = (int32_t*)&global->constval.ivec[0];