https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80501
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |rtl-optimization
--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
Combine is combining whole pack of instructions:
--cut here--
(insn 5 2 6 2 (set (reg:SI 96 [ tb ])
(sign_extend:SI (mem/c:QI (symbol_ref:DI ("tb") [flags 0x2] <var_decl
0x2b4eb164ce10 tb>) [0 tb+0 S1 A8]))) "pr80501.c":12 151 {extendqisi2}
(nil))
(insn 6 5 7 2 (set (reg:SI 97)
(not:SI (reg:SI 96 [ tb ]))) "pr80501.c":12 494 {*one_cmplsi2_1}
(expr_list:REG_DEAD (reg:SI 96 [ tb ])
(nil)))
(insn 7 6 8 2 (parallel [
(set (reg:SI 95)
(lshiftrt:SI (reg:SI 97)
(const_int 31 [0x1f])))
(clobber (reg:CC 17 flags))
]) "pr80501.c":12 544 {*lshrsi3_1}
(expr_list:REG_DEAD (reg:SI 97)
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil))))
(insn 8 7 9 2 (parallel [
(set (reg:SI 98)
(ashift:SI (reg:SI 95)
(const_int 7 [0x7])))
(clobber (reg:CC 17 flags))
]) "pr80501.c":6 511 {*ashlsi3_1}
(expr_list:REG_DEAD (reg:SI 95)
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil))))
(insn 9 8 10 2 (set (reg:CCNO 17 flags)
(compare:CCNO (subreg:QI (reg:SI 98) 0)
(const_int 0 [0]))) "pr80501.c":12 1 {*cmpqi_ccno_1}
(expr_list:REG_DEAD (reg:SI 98)
(nil)))
(insn 10 9 11 2 (set (reg:QI 100)
(gt:QI (reg:CCNO 17 flags)
(const_int 0 [0]))) "pr80501.c":12 613 {*setcc_qi}
(expr_list:REG_DEAD (reg:CCNO 17 flags)
(nil)))
(insn 11 10 16 2 (set (reg:SI 99)
(zero_extend:SI (reg:QI 100))) "pr80501.c":12 136 {*zero_extendqisi2}
(expr_list:REG_DEAD (reg:QI 100)
(nil)))
--cut here--
to:
(note 5 2 6 2 NOTE_INSN_DELETED)
(note 6 5 7 2 NOTE_INSN_DELETED)
(note 7 6 8 2 NOTE_INSN_DELETED)
(note 8 7 9 2 NOTE_INSN_DELETED)
(insn 9 8 10 2 (set (reg:CCZ 17 flags)
(compare:CCZ (zero_extract:SI (mem/c:QI (symbol_ref:DI ("tb") [flags
0x2] <var_decl 0x2b4eb164ce10 tb>) [0 tb+0 S1 A8])
(const_int 1 [0x1])
(const_int 7 [0x7]))
(const_int 0 [0]))) "pr80501.c":12 385 {*testqi_ext_3}
(nil))
(note 10 9 11 2 NOTE_INSN_DELETED)
(insn 11 10 16 2 (set (reg:SI 99)
(eq:SI (reg:CCZ 17 flags)
(const_int 0 [0]))) "pr80501.c":12 612 {*setcc_si_1_movzbl}
(expr_list:REG_DEAD (reg:CCNO 17 flags)
(nil)))
The insn is working as expected, it looks like combine problem to me.