https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82628
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |segher at gcc dot gnu.org
Component|tree-optimization |rtl-optimization
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
Looks like combine failure to me:
---cut here--
(insn 17 15 18 4 (set (reg:SI 93)
(const_int 1 [0x1])) "pr82628.c":14 82 {*movsi_internal}
(nil))
...
(insn 19 18 20 4 (set (reg:CC 17 flags)
(compare:CC (reg:SI 93)
(subreg:SI (reg/v:DI 89 [ d ]) 0))) "pr82628.c":14 7 {*cmpsi_1}
(expr_list:REG_DEAD (reg:SI 93)
(expr_list:REG_EQUAL (compare:CC (const_int 1 [0x1])
(subreg:SI (reg/v:DI 89 [ d ]) 0))
(nil))))
(insn 20 19 21 4 (parallel [
(set (reg:CCGZ 17 flags)
(compare:CCGZ (reg:SI 94)
(plus:SI (ltu:SI (reg:CC 17 flags)
(const_int 0 [0]))
(subreg:SI (reg/v:DI 89 [ d ]) 4))))
(clobber (scratch:SI))
]) "pr82628.c":14 307 {subsi3_carry_ccgz}
(expr_list:REG_DEAD (reg:SI 94)
(expr_list:REG_EQUAL (compare:CCGZ (const_int 0 [0])
(plus:SI (ltu:SI (reg:CC 17 flags)
(const_int 0 [0]))
(subreg:SI (reg/v:DI 89 [ d ]) 4)))
(nil))))
(jump_insn 21 20 22 4 (set (pc)
(if_then_else (geu (reg:CCGZ 17 flags)
(const_int 0 [0]))
(label_ref 16)
(pc))) "pr82628.c":14 664 {*jcc}
(expr_list:REG_DEAD (reg:CCGZ 17 flags)
(int_list:REG_BR_PROB 912680552 (nil)))
-> 16)
---cut here--
combines with:
Trying 17 -> 19:
Successfully matched this instruction:
(set (reg:CC 17 flags)
(compare:CC (subreg:SI (reg/v:DI 89 [ d ]) 0)
(const_int 1 [0x1])))
and further with:
Trying 19 -> 20:
Successfully matched this instruction:
(set (pc)
(label_ref 16))
I don't think that combining:
(set (reg:CC 17 flags)
(compare:CC (subreg:SI (reg/v:DI 89 [ d ]) 0)
(const_int 1 [0x1])))
with
(insn 20 19 21 4 (parallel [
(set (reg:CCGZ 17 flags)
(compare:CCGZ (reg:SI 94)
(plus:SI (ltu:SI (reg:CC 17 flags)
(const_int 0 [0]))
(subreg:SI (reg/v:DI 89 [ d ]) 4))))
(clobber (scratch:SI))
should result in unconditional jump:
(set (pc)
(label_ref 16))