[Bug target/40153] Long long comparison optimized away incorrectly in Thumb code.

2009-05-16 Thread rearnsha at gcc dot gnu dot org


--- Comment #4 from rearnsha at gcc dot gnu dot org  2009-05-16 12:53 
---
Subject: Bug 40153

Author: rearnsha
Date: Sat May 16 12:53:22 2009
New Revision: 147613

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147613
Log:
PR target/40153
* arm.md (cstoresi_nltu_thumb1): Use a neg of ltu as the pattern name
implies.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/arm.md


-- 


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



[Bug target/40153] Long long comparison optimized away incorrectly in Thumb code.

2009-05-16 Thread rearnsha at gcc dot gnu dot org


--- Comment #5 from rearnsha at gcc dot gnu dot org  2009-05-16 13:28 
---
Subject: Bug 40153

Author: rearnsha
Date: Sat May 16 13:28:27 2009
New Revision: 147614

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147614
Log:
PR target/40153
* arm.md (cstoresi_nltu_thumb1): Use a neg of ltu as the pattern name
implies.

Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/config/arm/arm.md


-- 


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



[Bug target/40153] Long long comparison optimized away incorrectly in Thumb code.

2009-05-16 Thread rearnsha at gcc dot gnu dot org


-- 

rearnsha at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rearnsha at gcc dot gnu dot
   ||org
 AssignedTo|unassigned at gcc dot gnu   |rearnsha at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Keywords||wrong-code
   Last reconfirmed|2009-05-15 08:26:09 |2009-05-16 13:49:20
   date||


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



[Bug target/40153] Long long comparison optimized away incorrectly in Thumb code.

2009-05-16 Thread dougkwan at google dot com


--- Comment #6 from dougkwan at google dot com  2009-05-16 17:46 ---
Thanks for fixing this.  I also submitted a patch yesterday with the same fix
and a test case also.  The bug is fixed but I think we still want the test
case, right?

(In reply to comment #4)
 Subject: Bug 40153
 
 Author: rearnsha
 Date: Sat May 16 12:53:22 2009
 New Revision: 147613
 
 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147613
 Log:
 PR target/40153
 * arm.md (cstoresi_nltu_thumb1): Use a neg of ltu as the pattern name
 implies.
 
 Modified:
 trunk/gcc/ChangeLog
 trunk/gcc/config/arm/arm.md
 


-- 


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



[Bug target/40153] Long long comparison optimized away incorrectly in Thumb code.

2009-05-16 Thread rearnsha at gcc dot gnu dot org


--- Comment #7 from rearnsha at gcc dot gnu dot org  2009-05-16 23:04 
---
Subject: Bug 40153

Author: rearnsha
Date: Sat May 16 23:04:06 2009
New Revision: 147626

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147626
Log:
PR target/40153
* arm.md (cstoresi_nltu_thumb1): Use a neg of ltu as the pattern name
implies.

Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/config/arm/arm.md


-- 


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



[Bug target/40153] Long long comparison optimized away incorrectly in Thumb code.

2009-05-16 Thread rearnsha at gcc dot gnu dot org


--- Comment #8 from rearnsha at gcc dot gnu dot org  2009-05-16 23:06 
---
(In reply to comment #6)
 Thanks for fixing this.  I also submitted a patch yesterday with the same fix
 and a test case also.  The bug is fixed but I think we still want the test
 case, right?

Sorry, didn't see your patch.  I don't think another test is really necessary,
this fixes so many failures on trunk that I don't see the need for an
additional test.


-- 

rearnsha at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.3.4


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



[Bug target/40153] Long long comparison optimized away incorrectly in Thumb code.

2009-05-15 Thread ramana at gcc dot gnu dot 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|-00-00 00:00:00 |2009-05-15 08:26:09
   date||


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



[Bug target/40153] Long long comparison optimized away incorrectly in Thumb code.

2009-05-15 Thread dougkwan at google dot com


--- 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|-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