Hello,
> In file loop_doloop.c function doloop_condition_get makes sure that
> the condition is GE or NE
> otherwise it prevents doloop optimizations. This caused a problem for
> a loop which had NE condition without unrolling and EQ if unrolling
> was run.
actually, doloop_condition_get is not applied to the code of the
program, so this change is irrelevant (doloop_condition_get is applied
to the doloop pattern from the machine description). So there must be
some other reason why doloop transformation is not applied for your
loop.
Zdenek
> Can I make doloop work after the unroller?
>
> Thanks,
> Vladimir
>
> ----------------------------------------------------------------------------------------
> Without unrolling:
> (insn 135 80 136 4 (set (reg:SI 204 [ LastIndex ])
> (plus:SI (reg:SI 204 [ LastIndex ])
> (const_int -1 [0xffffffffffffffff]))) 51 {addsi3} (nil)
> (nil))
>
> (jump_insn 136 135 84 4 (set (pc)
> (if_then_else (ne:SI (reg:SI 204 [ LastIndex ])
> (const_int 0 [0x0]))
> (label_ref:SI 69)
> (pc))) 368 {*spu.md:3288} (insn_list:REG_DEP_TRUE 135 (nil))
> (expr_list:REG_BR_PROB (const_int 9000 [0x2328])
> (nil)))
>
>
> After unrolling:
> (insn 445 421 446 21 (set (reg:SI 213)
> (plus:SI (reg:SI 213)
> (const_int -1 [0xffffffffffffffff]))) 51 {addsi3} (nil)
> (nil))
>
> (jump_insn 446 445 667 21 (set (pc)
> (if_then_else (eq:SI (reg:SI 213)
> (const_int 0 [0x0]))
> (label_ref:SI 465)
> (pc))) 368 {*spu.md:3288} (insn_list:REG_DEP_TRUE 445 (nil))
> (expr_list:REG_BR_PROB (const_int 1000 [0x3e8])
> (nil)))