On 08/09/2010 01:39 PM, Ulrich Weigand wrote:
(define_expand "cbranchsi4"
   [(parallel [(set (cc0)
                    (compare (match_operand:SI 1 "register_operand" "")
                             (match_operand:SI 2 "nonmemory_operand" "")))
               (clobber (match_scratch:QI 4 ""))])
    (set (pc)
         (if_then_else
               (match_operator 0 "ordered_comparison_operator" [(cc0)
                                                                (const_int 0)])
               (label_ref (match_operand 3 "" ""))
               (pc)))]
  "")


[...] the second pattern of the PARALLEL is just a CLOBBER.

The USE of CC0 happens in a completely separate second INSN that is
emitted by this define_expand.  (Note that as opposed to define_insn,
define_expand can emit more than a single insn.)

Yeah, that's the case. What my patch did was just to combine the PARALLEL that the old cmpsi patterns produced (cc0 set), and the SET of the old bCC patterns (cc0 use).

In fact, having a cc0 set not _followed_ by a cc0 use would totally break every other RTL pass.

Paolo

Reply via email to