This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Does unrolling prevents doloop optimizations?


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. 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)))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]