X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firvrfy.c;h=dd356533f9c098ec90dedd715aed097c4fa7c9ab;hb=eda9d668d0e8c8246015b4c5e743316a6a835a23;hp=0ad233e974519f010f34771ab0fc265f24a99f4d;hpb=f8f5710e28629e7f2a7f40fe22eac6739c488d71;p=libfirm diff --git a/ir/ir/irvrfy.c b/ir/ir/irvrfy.c index 0ad233e97..dd356533f 100644 --- a/ir/ir/irvrfy.c +++ b/ir/ir/irvrfy.c @@ -1,15 +1,28 @@ /* - * Project: libFIRM - * File name: ir/ir/irvrfy.c - * Purpose: Check irnodes for correctness. - * Author: Christian Schaefer - * Modified by: Goetz Lindenmaier. Till Riedel. Michael Beck. - * Created: - * CVS-ID: $Id$ - * Copyright: (c) 1998-2003 Universität Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. */ +/** + * @file + * @brief Check irnodes for correctness. + * @author Christian Schaefer, Goetz Lindenmaier, Till Riedel, Michael Beck + * @version $Id$ + */ #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -1643,12 +1656,16 @@ static int verify_node_CopyB(ir_node *n, ir_graph *irg) { 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 && - mode_is_reference(op2mode) && - mode_is_reference(op3mode), - "CopyB node", 0 ); /* operand M x ref x ref */ + 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),