https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108292
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sayle at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, we have ix86_expand_int_movcc called with operands:
(reg:SI 170)
(ne (reg:SI 86 [ _14 ])
(const_int 0 [0]))
(const_int 31 [0x1f])
(const_int 0 [0])
and the function emits:
(insn 42 0 43 (set (reg:CC 17 flags)
(compare:CC (reg:SI 86 [ _14 ])
(const_int 1 [0x1]))) "pr108292.c":9:5 -1
(nil))
(insn 43 42 44 (parallel [
(set (reg:SI 171)
(if_then_else:SI (ltu:SI (reg:CC 17 flags)
(const_int 0 [0]))
(const_int -1 [0xffffffffffffffff])
(const_int 0 [0])))
(clobber (reg:CC 17 flags))
]) "pr108292.c":9:5 -1
(expr_list:REG_EQUAL (neg:SI (ne:SI (reg:SI 86 [ _14 ])
(const_int 0 [0])))
(nil)))
(insn 44 43 45 (set (reg:SI 172)
(not:SI (reg:SI 171))) "pr108292.c":9:5 -1
(nil))
(insn 45 44 46 (parallel [
(set (reg:SI 173)
(and:SI (reg:SI 172)
(const_int 31 [0x1f])))
(clobber (reg:CC 17 flags))
]) "pr108292.c":9:5 -1
(nil))
(insn 46 45 0 (set (reg:SI 170)
(reg:SI 173)) "pr108292.c":9:5 -1
(nil))
I believe the REG_EQUAL note is incorrect, it would be correct on insn 44,
pseudo 172 is r86 != 0 ? -1 : 0, while pseudo 171 is r86 == 0 ? -1 : 0.