summaryrefslogtreecommitdiffhomepage
path: root/ir/lower
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-08-06 17:09:44 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2018-08-06 17:09:44 +0200
commitb40a05a50fc12c92c5d094ff04a3ae4409a2215d (patch)
treec44233a8eba6adf8913e5663611dde00d6f2b318 /ir/lower
parentfa4fea6c01a13e4cb7bfbffb018b9407f531f80b (diff)
dw_lower: Use a more efficient lowering for ir_bk_parity.
Eor(Parity(hi), Parity(lo)) -> Parity(Eor(hi, lo)).
Diffstat (limited to 'ir/lower')
-rw-r--r--ir/lower/lower_dw.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ir/lower/lower_dw.c b/ir/lower/lower_dw.c
index 25661f4..c7e3621 100644
--- a/ir/lower/lower_dw.c
+++ b/ir/lower/lower_dw.c
@@ -2143,11 +2143,9 @@ static void lower_reduce_builtin(ir_node *const builtin)
break;
}
case ir_bk_parity: {
- ir_node *parity_high = new_rd_Builtin(dbgi, block, mem, 1, in_high, kind, lowered_type_high);
- ir_node *high = new_r_Proj(parity_high, result_mode, pn_Builtin_max+1);
- ir_node *parity_low = new_rd_Builtin(dbgi, block, mem, 1, in_low, kind, lowered_type_low);
- ir_node *low = new_r_Proj(parity_low, result_mode, pn_Builtin_max+1);
- res = new_rd_Eor(dbgi, block, high, low);
+ ir_node *const in[] = { new_rd_Eor(dbgi, block, in_high[0], in_low[0]) };
+ ir_node *const parity = new_rd_Builtin(dbgi, block, mem, 1, in, kind, lowered_type_high);
+ res = new_r_Proj(parity, result_mode, pn_Builtin_max + 1);
break;
}
default: