From c31c59312bf6afe68cc32c6926db9f0328b5f196 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sat, 11 Aug 2012 19:38:02 +0200 Subject: [PATCH] ir_block_create_store/p will now honor -fadjust-vector-fields by using STORE_V/STOREP_V instead of _FLD on vector-fields --- ir.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); } -- 2.39.2