I merge two SET insns to a PARALLEL before gcc's schedule_insns () in pass_sched . Would you please tell me where is the bug? Thanks!
CODE: void merge(rtx insn1,rtx insn2) { rtx parallel; parallel = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (2)); XVECEXP (par, 0, 0) = PATTERN(insn1); XVECEXP (par, 0, 1) = PATTERN(insn2); PATTERN(insn1) = parallel; delete_insn(insn2); } GDB REPORT 0x000000000067aa5c in constrain_operands (strict=0) at ../../gcc-4.4.0/gcc/recog.c:2306 2306 enum machine_mode mode = GET_MODE (op); (gdb) bt #0 0x000000000067aa5c in constrain_operands (strict=0) at ../../gcc-4.4.0/gcc/recog.c:2306 #1 0x0000000000679f17 in extract_constrain_insn_cached (insn=0x2a961a3d20) at ../../gcc-4.4.0/gcc/recog.c:1965 #2 0x00000000008f2423 in insn_default_latency (insn=0x2a961a3d20) at ../../gcc-4.4.0/gcc/config/mips/mips.md:584 #3 0x0000000000a238b9 in insn_cost (insn=0x2a961a3d20) at ../../gcc-4.4.0/gcc/haifa-sched.c:636 #4 0x0000000000a239de in dep_cost_1 (link=0xf69120, dw=0) at ../../gcc-4.4.0/gcc/haifa-sched.c:670 #5 0x0000000000a23b00 in dep_cost (link=0xf69120) at ../../gcc-4.4.0/gcc/haifa-sched.c:725 #6 0x0000000000a23d8f in priority (insn=0x2a961a3d20) at ../../gcc-4.4.0/gcc/haifa-sched.c:834 #7 0x0000000000a275ca in set_priorities (head=0x2a961a3cd0, tail=0x2a961933c0) at ../../gcc-4.4.0/gcc/haifa-sched.c:2830 #8 0x00000000006d0c2e in compute_priorities () at ../../gcc-4.4.0/gcc/sched-rgn.c:3220 #9 0x00000000006d0c97 in schedule_region (rgn=0) at ../../gcc-4.4.0/gcc/sched-rgn.c:3249 #10 0x00000000006d1a69 in schedule_insns () at ../../gcc-4.4.0/gcc/sched-rgn.c:3662 #11 0x00000000006d22de in rest_of_handle_sched () at ../../gcc-4.4.0/gcc/sched-rgn.c:3861 #12 0x0000000000657289 in execute_one_pass (pass=0xdca020) at ../../gcc-4.4.0/gcc/passes.c:1278 #13 0x0000000000657471 in execute_pass_list (pass=0xdca020) at ../../gcc-4.4.0/gcc/passes.c:1327 #14 0x000000000065748d in execute_pass_list (pass=0xdc8ce0) at ../../gcc-4.4.0/gcc/passes.c:1328 #15 0x0000000000769feb in tree_rest_of_compilation (fndecl=0x2a96155f00) at ../../gcc-4.4.0/gcc/tree-optimize.c:420 #16 0x00000000008b2830 in cgraph_expand_function (node=0x2a96181000) at ../../gcc-4.4.0/gcc/cgraphunit.c:1047 #17 0x00000000008b2a0c in cgraph_expand_all_functions () at ../../gcc-4.4.0/gcc/cgraphunit.c:1106 #18 0x00000000008b2f9e in cgraph_optimize () at ../../gcc-4.4.0/gcc/cgraphunit.c:1311 #19 0x000000000041a386 in c_write_global_declarations () at ../../gcc-4.4.0/gcc/c-decl.c:8102 #20 0x000000000071face in compile_file () at ../../gcc-4.4.0/gcc/toplev.c:981 #21 0x0000000000721527 in do_compile () at ../../gcc-4.4.0/gcc/toplev.c:2193 #22 0x0000000000721589 in toplev_main (argc=8, argv=0x7fbffff8c8) at ../../gcc-4.4.0/gcc/toplev.c:2225 #23 0x000000000047d63b in main (argc=8, argv=0x7fbffff8c8) at ../../gcc-4.4.0/gcc/main.c:35 -- Jianzhang Peng