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

--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
In this testcase ifcvt happens upon a branch like:


(jump_insn 28 27 65 2 (set (pc)
        (if_then_else (eq (reg:CCEQ 183)
                (const_int 0 [0]))
            (label_ref:SI 65)
            (pc))) "78751-0.c":8 796 {*rs6000.md:12174}
     (expr_list:REG_DEAD (reg:CCEQ 183)
        (int_list:REG_BR_PROB 5000 (nil)))


where that reg 183 is set up with


(insn 27 26 28 2 (set (reg:CCEQ 183)
        (compare:CCEQ (gt:SI (reg:CC 168)
                (const_int 0 [0]))
            (ne:SI (reg:CC 179)
                (const_int 0 [0])))) "78751-0.c":8 805 {*rs6000.md:12298}
     (expr_list:REG_DEAD (reg:CC 179)
        (expr_list:REG_DEAD (reg:CC 168)
            (nil))))


This is a crxor on the outputs of two compares, an unnamed
define_insn_and_split (search for "creqv or crxor" in rs6000.md).

ifcvt wants to combine this with a trap in the branch block to become
a conditional branch.  To do that, it makes insns like


(insn 63 26 64 2 (set (reg:SI 189)
        (gt:SI (reg:CC 168)
            (const_int 0 [0]))) -1
     (nil))
(insn 64 63 65 2 (set (reg:SI 190)
        (ne:SI (reg:CC 179)
            (const_int 0 [0]))) -1
     (nil))
(insn 65 64 27 2 (trap_if (ne (reg:SI 189)
            (reg:SI 190))
        (const_int 0 [0])) -1
     (nil))

but those do not exist (there is no pattern without clobbers for NE).

Reply via email to