+/**
+ * verify a CopyB node
+ */
+static int verify_node_CopyB(ir_node *n, ir_graph *irg) {
+ ir_mode *mymode = get_irn_mode(n);
+ ir_mode *op1mode = get_irn_mode(get_CopyB_mem(n));
+ ir_mode *op2mode = get_irn_mode(get_CopyB_dst(n));
+ ir_mode *op3mode = get_irn_mode(get_CopyB_src(n));
+ ir_type *t = get_CopyB_type(n);
+
+ /* CopyB: BB x M x ref x ref --> M x X */
+ ASSERT_AND_RET(mymode == mode_T && op1mode == mode_M, "CopyB node", 0);
+ if(get_irg_phase_state(irg) != phase_backend) {
+ ASSERT_AND_RET(mode_is_reference(op2mode) && mode_is_reference(op3mode),
+ "CopyB node", 0 );
+ } else {
+ ASSERT_AND_RET(mode_is_reference(op2mode) ||
+ (mode_is_int(op2mode) && get_mode_size_bits(op2mode) == get_mode_size_bits(mode_P)), "Load node", 0 );
+ ASSERT_AND_RET(mode_is_reference(op3mode) ||
+ (mode_is_int(op3mode) && get_mode_size_bits(op3mode) == get_mode_size_bits(mode_P)), "Load node", 0 );
+ }
+
+ ASSERT_AND_RET(
+ is_compound_type(t),
+ "CopyB node should copy compound types only", 0 );
+
+ /* NoMem nodes are only allowed as memory input if the CopyB is NOT pinned.
+ This should happen RARELY, as CopyB COPIES MEMORY */
+ ASSERT_AND_RET(
+ (get_irn_op(get_CopyB_mem(n)) == op_NoMem) ||
+ (get_irn_op(get_CopyB_mem(n)) != op_NoMem && get_irn_pinned(n) == op_pin_state_pinned),
+ "CopyB node with wrong memory input", 0 );
+ return 1;
+}
+
+/**
+ * verify a Bound node
+ */
+static int verify_node_Bound(ir_node *n, ir_graph *irg) {
+ ir_mode *mymode = get_irn_mode(n);
+ ir_mode *op1mode = get_irn_mode(get_Bound_mem(n));
+ ir_mode *op2mode = get_irn_mode(get_Bound_index(n));
+ ir_mode *op3mode = get_irn_mode(get_Bound_lower(n));
+ ir_mode *op4mode = get_irn_mode(get_Bound_upper(n));
+
+ /* Bound: BB x M x ref x ref --> M x X */
+ ASSERT_AND_RET(
+ mymode == mode_T &&
+ op1mode == mode_M &&
+ op2mode == op3mode &&
+ op3mode == op4mode &&
+ mode_is_int(op3mode),
+ "Bound node", 0 ); /* operand M x int x int x int */
+
+ /* NoMem nodes are only allowed as memory input if the Bound is NOT pinned.
+ This should happen RARELY, as Bound COPIES MEMORY */
+ ASSERT_AND_RET(
+ (get_irn_op(get_Bound_mem(n)) == op_NoMem) ||
+ (get_irn_op(get_Bound_mem(n)) != op_NoMem && get_irn_pinned(n) == op_pin_state_pinned),
+ "Bound node with wrong memory input", 0 );
+ return 1;
+}
+
+/**