https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82692

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Segher Boessenkool from comment #3)
> The combine output you showed is _not_ succeeding though?  "matched"
> just means the rtx was recog()'ed; not that it was actually replaced.

FAOD, this is the sequence before combine:

--cut here--
(insn 7 6 8 2 (set (reg:CCFPU 17 flags)
        (compare:CCFPU (reg:DF 95)
            (reg/v:DF 91 [ x ]))) "pr82692.c":9 52 {*cmpiudf}
     (expr_list:REG_DEAD (reg:DF 95)
        (expr_list:REG_EQUAL (compare:CCFPU (const_double:DF 0.0 [0x0.0p+0])
                (reg/v:DF 91 [ x ]))
            (nil))))
(insn 8 7 9 2 (set (reg:QI 94)
        (unlt:QI (reg:CCFPU 17 flags)
            (const_int 0 [0]))) "pr82692.c":9 664 {*setcc_qi}
     (expr_list:REG_DEAD (reg:CCFPU 17 flags)
        (nil)))
(insn 9 8 10 2 (set (reg:CCZ 17 flags)
        (compare:CCZ (reg:QI 94)
            (const_int 0 [0]))) "pr82692.c":9 1 {*cmpqi_ccno_1}
     (expr_list:REG_DEAD (reg:QI 94)
        (nil)))
(jump_insn 10 9 32 2 (set (pc)
        (if_then_else (eq (reg:CCZ 17 flags)
                (const_int 0 [0]))
            (label_ref:DI 34)
            (pc))) "pr82692.c":9 668 {*jcc}
     (expr_list:REG_DEAD (reg:CCZ 17 flags)
        (int_list:REG_BR_PROB 182536112 (nil)))
 -> 34)
--cut here--

which is converted by combine pass to:

--cut here--
(note 7 6 8 2 NOTE_INSN_DELETED)
(note 8 7 9 2 NOTE_INSN_DELETED)
(insn 9 8 10 2 (set (reg:CCFP 17 flags)
        (compare:CCFP (reg:DF 95)
            (reg/v:DF 91 [ x ]))) "pr82692.c":9 50 {*cmpidf}
     (expr_list:REG_DEAD (reg:DF 95)
        (nil)))
(jump_insn 10 9 32 2 (set (pc)
        (if_then_else (ge (reg:CCFP 17 flags)
                (const_int 0 [0]))
            (label_ref:DI 34)
            (pc))) "pr82692.c":9 668 {*jcc}
     (expr_list:REG_DEAD (reg:CCZ 17 flags)
        (int_list:REG_BR_PROB 182536112 (nil)))
 -> 34)
--cut here--

UNLT compare (CCFPUmode) has been converted to GE compare (CCFPmode). This is
not correct as far as traps are concerned, since UNLT doesn't trap on qNaN,
while GE does.

Reply via email to