------- Comment #1 from dougkwan at google dot com  2009-05-15 07:08 -------
This is caused by a typo in arm.md.

(define_insn "cstoresi_nltu_thumb1"
  [(set (match_operand:SI 0 "s_register_operand" "=l,l")
        (neg:SI (gtu:SI (match_operand:SI 1 "s_register_operand" "l,*h")
                        (match_operand:SI 2 "thumb1_cmp_operand" "lI*h,*r"))))]
  "TARGET_THUMB1"
  "cmp\\t%1, %2\;sbc\\t%0, %0, %0"
  [(set_attr "length" "4")]
)

The instruction cstoresi_nltu_thumb1 is used to compute the expression -(x < y)
where x and y are unsigned SI-type values.  The operand of the NEG RTX should
be a LTU RTX instead of a GTU RTX.  The incorrected RTX code caused a later CSE
pass to substitute this pattern:

(set x
    (neg (gtu a b)))   <=== cstoresi_nltu_thumb1
(set y (neg x))        

with

(set y (gtu a b))

I tried fixing the RTX code and the test case passed.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40153

Reply via email to