Commit 5413681e authored by Matthias Braun's avatar Matthias Braun
Browse files

fix and(cmp,cmp) optimisation rule, loosen verify to allow and/or/xor for reference modes

parent 3a448bc0
......@@ -3176,7 +3176,7 @@ static ir_node *transform_node_And(ir_node *n)
if (get_irn_mode(n_b_left) != mode) {
n_b_left = new_rd_Conv(dbgi, block, b_left, mode);
}
ir_node *or = new_rd_Or(dbgi, block, a_left, b_left, mode);
ir_node *or = new_rd_Or(dbgi, block, a_left, n_b_left, mode);
ir_graph *irg = get_irn_irg(n);
ir_node *zero = create_zero_const(irg, mode);
return new_rd_Cmp(dbgi, block, or, zero, relation);
......
......@@ -1276,7 +1276,7 @@ static int verify_node_Logic(ir_node *n, ir_graph *irg)
ASSERT_AND_RET_DBG(
/* And or Or or Eor: BB x int x int --> int */
(mode_is_int(mymode) || mymode == mode_b) &&
(mode_is_int(mymode) || mode_is_reference(mymode) || mymode == mode_b) &&
op2mode == op1mode &&
mymode == op2mode,
"And, Or or Eor node", 0,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment