[Bug target/66620] bfin: bfin.c: (hwloop_optimize): gcc_assert (JUMP_P (insn)) fails.
gang.chen.5i5j at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Jun 27 02:08:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66620
--- Comment #2 from Chen Gang <gang.chen.5i5j at gmail dot com> ---
(In reply to Mikhail Maltsev from comment #1)
> Started with r208165.
OK, thanks. Really it is, it is valuable to me (it can generate the correct
insns for comparing). And also if remove "-fno-reorder-blocks", it can generate
correct insns too (after comparing with the original correct insns, this
optimized insns are correct).
In our case, the issue insn is:
(insn 132 59 74 6 (parallel [
(set (reg:SI 45 LT1)
(label_ref 74))
(set (reg:SI 49 LB1)
(label_ref 133))
(set (reg:SI 47 LC1)
(reg:SI 8 P0 [112]))
]) lpt_commit.i:11 -1
(nil))
it is in an incorrect area, which want to optimize the insns below in another
area:
(note 68 67 69 9 [bb 9] NOTE_INSN_BASIC_BLOCK)
(insn:TI 69 68 109 9 (set (reg/v:SI 0 R0 [orig:94 iip ] [94])
(plus:SI (reg/v:SI 0 R0 [orig:94 iip ] [94])
(const_int 1 [0x1]))) lpt_commit.i:19 50 {addsi3}
(nil))
(jump_insn:TI 109 69 73 9 (parallel [
(set (pc)
(if_then_else (ne (reg:SI 8 P0 [112])
(const_int 1 [0x1]))
(label_ref:SI 70)
(pc)))
(set (reg:SI 8 P0 [112])
(plus:SI (reg:SI 8 P0 [112])
(const_int -1 [0xffffffffffffffff])))
(unspec [
(const_int 0 [0])
] 10)
(clobber (scratch:SI))
]) lpt_commit.i:19 96 {loop_end}
(int_list:REG_BR_PROB 7384 (nil))
-> 70)
The incorrect insn wants to merge the too "for (iip = 0; iip < 4; iip++) {...}"
in one.
Next, I shall continue analyzing it, and the all related insns are in
attachments. And welcome any ideas, suggestions and completions, Thanks.
More information about the Gcc-bugs
mailing list