From: Wolfgang (Blub) Bumiller Date: Sat, 11 Aug 2012 17:38:02 +0000 (+0200) Subject: ir_block_create_store/p will now honor -fadjust-vector-fields by using STORE_V/STOREP... X-Git-Tag: 0.1-rc1~349^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c31c59312bf6afe68cc32c6926db9f0328b5f196;p=xonotic%2Fgmqcc.git ir_block_create_store/p will now honor -fadjust-vector-fields by using STORE_V/STOREP_V instead of _FLD on vector-fields --- diff --git a/ir.c b/ir.c index 74923c4..d9fdcf7 100644 --- a/ir.c +++ b/ir.c @@ -963,6 +963,11 @@ bool ir_block_create_store(ir_block *self, ir_value *target, ir_value *what) #endif op = type_store_instr[vtype]; + if (OPTS_FLAG(ADJUST_VECTOR_FIELDS)) { + if (op == INSTR_STORE_FLD && what->fieldtype == TYPE_VECTOR) + op = INSTR_STORE_V; + } + return ir_block_create_store_op(self, op, target, what); } @@ -980,6 +985,10 @@ bool ir_block_create_storep(ir_block *self, ir_value *target, ir_value *what) vtype = what->vtype; op = type_storep_instr[vtype]; + if (OPTS_FLAG(ADJUST_VECTOR_FIELDS)) { + if (op == INSTR_STOREP_FLD && what->fieldtype == TYPE_VECTOR) + op = INSTR_STOREP_V; + } return ir_block_create_store_op(self, op, target, what); }