X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firvrfy.c;h=457bc623bd135f55ebb3b46dcd78e871c5ebb982;hb=b597c7fd473086ca6374b2abbdf129f595c156d0;hp=e5982cd50204e77e1358e751f9a8bf62e78c25cb;hpb=f2d236f4fac425604e8552790432332ff216c065;p=libfirm diff --git a/ir/ir/irvrfy.c b/ir/ir/irvrfy.c index e5982cd50..457bc623b 100644 --- a/ir/ir/irvrfy.c +++ b/ir/ir/irvrfy.c @@ -868,18 +868,23 @@ static int verify_node_Block(ir_node *n, ir_graph *irg) { /* Blocks with more than one predecessor must be header blocks */ ASSERT_AND_RET(get_Block_n_cfgpreds(n) == 1, "partBlock with more than one predecessor", 0); - pred = get_Block_cfgpred(n, 0); - if (is_Proj(pred)) { - /* the predecessor MUST be a regular Proj */ - ir_node *frag_op = get_Proj_pred(pred); - ASSERT_AND_RET(is_fragile_op(frag_op) && get_Proj_proj(pred) == pn_Generic_X_regular, - "partBlock with non-regular predecessor", 0); + if (get_irg_phase_state(irg) != phase_backend) { + pred = get_Block_cfgpred(n, 0); + if (is_Proj(pred)) { + /* the predecessor MUST be a regular Proj */ + ir_node *frag_op = get_Proj_pred(pred); + ASSERT_AND_RET( + is_fragile_op(frag_op) && get_Proj_proj(pred) == pn_Generic_X_regular, + "partBlock with non-regular predecessor", 0); + } else { + /* We allow Jmps to be predecessors of partBlocks. This can happen due to optimization + of fragile nodes during construction. It does not violate our assumption of dominance + so let it. */ + ASSERT_AND_RET(is_Jmp(pred) || is_Bad(pred), + "partBlock with non-regular predecessor", 0); + } } else { - /* We allow Jmps to be predecessors of partBlocks. This can happen due to optimization - of fragile nodes during construction. It does not violate our assumption of dominance - so let it. */ - ASSERT_AND_RET(is_Jmp(pred) || is_Bad(pred), - "partBlock with non-regular predecessor", 0); + /* relax in backend: Bound nodes are probably lowered into conditional jumps */ } } @@ -1274,15 +1279,12 @@ static int verify_node_Sub(ir_node *n, ir_graph *irg) { (mymode ==op1mode && mymode == op2mode && mode_is_data(op1mode)) || /* Pointer Sub: BB x ref x int --> ref */ (op1mode == mymode && mode_is_int(op2mode) && mode_is_reference(mymode)) || - /* Pointer Sub: BB x int x ref --> ref */ - (mode_is_int(op1mode) && op2mode == mymode && mode_is_reference(mymode)) || /* Pointer Sub: BB x ref x ref --> int */ (op1mode == op2mode && mode_is_reference(op2mode) && mode_is_int(mymode)) ), "Sub node", 0, show_binop_failure(n, "/* common Sub: BB x numP x numP --> numP */ |\n" "/* Pointer Sub: BB x ref x int --> ref */ |\n" - "/* Pointer Sub: BB x int x ref --> ref */ |\n" "/* Pointer Sub: BB x ref x ref --> int */" ); ); return 1; @@ -1822,11 +1824,11 @@ static int verify_node_Mux(ir_node *n, ir_graph *irg) { (void) irg; ASSERT_AND_RET( - /* Mux: BB x b x numP x numP --> numP */ + /* Mux: BB x b x datab x datab --> datab */ op1mode == mode_b && op2mode == mymode && op3mode == mymode && - mode_is_data(mymode), + mode_is_datab(mymode), "Mux node", 0 ); return 1;