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

Re: [patch] Add TST to RX

On 07/14/2010 06:23 PM, DJ Delorie wrote:
This seems wrong.  It should be (if_then_else (ne (zero_extract:SI
...))).  If that one is not generated by combine (likely because ne is
removed somewhere?) that should be fixed.

This pattern may well be the reason why canonicalize_condition is called
with a non-comparison RTL.

It is caused by combine. I put a debug_rtx() after recog_for_combine() to see what gcc is expecting, and that's the pattern it's looking for.

Feel free to figure *that* one out too :-)

It's the same thing. Here:

(define_expand "cbranchsi4"
  [(set (cc0) (compare:CC (match_operand:SI 1 "register_operand")
                          (match_operand:SI 2 "rx_source_operand")))
   (set (pc)
        (if_then_else (match_operator:SI  0 "comparison_operator"
                                          [(cc0) (const_int 0)])
                      (label_ref (match_operand 3 ""))

the match_operator should be modeless. (ne:SI (zero_extract:SI) (const_int 0)) is indeed the same as just the zero_extract, but not with a modeless ne. So combine is correct.


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