This is the mail archive of the gcc-bugs@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]

[Bug target/82692] [8 Regression] Ordered comparisons used for unordered built-ins


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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-10-24
     Ever confirmed|0                           |1

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
Happens in combine:

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

combines to:

Trying 8 -> 9:
Failed to match this instruction:
(set (reg:CCFPU 17 flags)
    (reg:CCFPU 17 flags))
Successfully matched this instruction:
(set (pc)
    (if_then_else (ge (reg:CCFPU 17 flags)
            (const_int 0 [0]))
        (label_ref:DI 34)
        (pc)))

Trying 7 -> 9:
Successfully matched this instruction:
(set (reg:CCFP 17 flags)
    (compare:CCFP (reg:DF 95)
        (reg/v:DF 91 [ x ])))
Successfully matched this instruction:
(set (pc)
    (if_then_else (ge (reg:CCFP 17 flags)
            (const_int 0 [0]))
        (label_ref:DI 34)
        (pc)))

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