------- Comment #3 from dougkwan at google dot com 2009-05-15 08:28 ------- Subject: Re: Long long comparison optimized away incorrectly in Thumb code.
I am running regression tests and will submit a patch tomorrow morning after that. -Doug 2009/5/15 ramana at gcc dot gnu dot org <gcc-bugzi...@gcc.gnu.org>: > > > ------- Comment #2 from ramana at gcc dot gnu dot org 2009-05-15 08:26 > ------- > (In reply to comment #1) >> 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. >> > > This looks correct. Please submit a patch to gcc-patc...@. > > > -- > > ramana at gcc dot gnu dot org changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|UNCONFIRMED |NEW > Ever Confirmed|0 |1 > Last reconfirmed|0000-00-00 00:00:00 |2009-05-15 08:26:09 > date| | > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40153 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40153